<!DOCTYPE html>
<html>
<head>
<title>pdf.md</title>
<meta http-equiv="Content-type" content="text/html;charset=UTF-8">

<style>
/* https://github.com/microsoft/vscode/blob/master/extensions/markdown-language-features/media/markdown.css */
/*---------------------------------------------------------------------------------------------
 *  Copyright (c) Microsoft Corporation. All rights reserved.
 *  Licensed under the MIT License. See License.txt in the project root for license information.
 *--------------------------------------------------------------------------------------------*/

body {
	font-family: var(--vscode-markdown-font-family, -apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI", "Ubuntu", "Droid Sans", sans-serif);
	font-size: var(--vscode-markdown-font-size, 14px);
	padding: 0 26px;
	line-height: var(--vscode-markdown-line-height, 22px);
	word-wrap: break-word;
}

#code-csp-warning {
	position: fixed;
	top: 0;
	right: 0;
	color: white;
	margin: 16px;
	text-align: center;
	font-size: 12px;
	font-family: sans-serif;
	background-color:#444444;
	cursor: pointer;
	padding: 6px;
	box-shadow: 1px 1px 1px rgba(0,0,0,.25);
}

#code-csp-warning:hover {
	text-decoration: none;
	background-color:#007acc;
	box-shadow: 2px 2px 2px rgba(0,0,0,.25);
}

body.scrollBeyondLastLine {
	margin-bottom: calc(100vh - 22px);
}

body.showEditorSelection .code-line {
	position: relative;
}

body.showEditorSelection .code-active-line:before,
body.showEditorSelection .code-line:hover:before {
	content: "";
	display: block;
	position: absolute;
	top: 0;
	left: -12px;
	height: 100%;
}

body.showEditorSelection li.code-active-line:before,
body.showEditorSelection li.code-line:hover:before {
	left: -30px;
}

.vscode-light.showEditorSelection .code-active-line:before {
	border-left: 3px solid rgba(0, 0, 0, 0.15);
}

.vscode-light.showEditorSelection .code-line:hover:before {
	border-left: 3px solid rgba(0, 0, 0, 0.40);
}

.vscode-light.showEditorSelection .code-line .code-line:hover:before {
	border-left: none;
}

.vscode-dark.showEditorSelection .code-active-line:before {
	border-left: 3px solid rgba(255, 255, 255, 0.4);
}

.vscode-dark.showEditorSelection .code-line:hover:before {
	border-left: 3px solid rgba(255, 255, 255, 0.60);
}

.vscode-dark.showEditorSelection .code-line .code-line:hover:before {
	border-left: none;
}

.vscode-high-contrast.showEditorSelection .code-active-line:before {
	border-left: 3px solid rgba(255, 160, 0, 0.7);
}

.vscode-high-contrast.showEditorSelection .code-line:hover:before {
	border-left: 3px solid rgba(255, 160, 0, 1);
}

.vscode-high-contrast.showEditorSelection .code-line .code-line:hover:before {
	border-left: none;
}

img {
	max-width: 100%;
	max-height: 100%;
}

a {
	text-decoration: none;
}

a:hover {
	text-decoration: underline;
}

a:focus,
input:focus,
select:focus,
textarea:focus {
	outline: 1px solid -webkit-focus-ring-color;
	outline-offset: -1px;
}

hr {
	border: 0;
	height: 2px;
	border-bottom: 2px solid;
}

h1 {
	padding-bottom: 0.3em;
	line-height: 1.2;
	border-bottom-width: 1px;
	border-bottom-style: solid;
}

h1, h2, h3 {
	font-weight: normal;
}

table {
	border-collapse: collapse;
}

table > thead > tr > th {
	text-align: left;
	border-bottom: 1px solid;
}

table > thead > tr > th,
table > thead > tr > td,
table > tbody > tr > th,
table > tbody > tr > td {
	padding: 5px 10px;
}

table > tbody > tr + tr > td {
	border-top: 1px solid;
}

blockquote {
	margin: 0 7px 0 5px;
	padding: 0 16px 0 10px;
	border-left-width: 5px;
	border-left-style: solid;
}

code {
	font-family: Menlo, Monaco, Consolas, "Droid Sans Mono", "Courier New", monospace, "Droid Sans Fallback";
	font-size: 1em;
	line-height: 1.357em;
}

body.wordWrap pre {
	white-space: pre-wrap;
}

pre:not(.hljs),
pre.hljs code > div {
	padding: 16px;
	border-radius: 3px;
	overflow: auto;
}

pre code {
	color: var(--vscode-editor-foreground);
	tab-size: 4;
}

/** Theming */

.vscode-light pre {
	background-color: rgba(220, 220, 220, 0.4);
}

.vscode-dark pre {
	background-color: rgba(10, 10, 10, 0.4);
}

.vscode-high-contrast pre {
	background-color: rgb(0, 0, 0);
}

.vscode-high-contrast h1 {
	border-color: rgb(0, 0, 0);
}

.vscode-light table > thead > tr > th {
	border-color: rgba(0, 0, 0, 0.69);
}

.vscode-dark table > thead > tr > th {
	border-color: rgba(255, 255, 255, 0.69);
}

.vscode-light h1,
.vscode-light hr,
.vscode-light table > tbody > tr + tr > td {
	border-color: rgba(0, 0, 0, 0.18);
}

.vscode-dark h1,
.vscode-dark hr,
.vscode-dark table > tbody > tr + tr > td {
	border-color: rgba(255, 255, 255, 0.18);
}

</style>

<style>
/* Tomorrow Theme */
/* http://jmblog.github.com/color-themes-for-google-code-highlightjs */
/* Original theme - https://github.com/chriskempson/tomorrow-theme */

/* Tomorrow Comment */
.hljs-comment,
.hljs-quote {
	color: #8e908c;
}

/* Tomorrow Red */
.hljs-variable,
.hljs-template-variable,
.hljs-tag,
.hljs-name,
.hljs-selector-id,
.hljs-selector-class,
.hljs-regexp,
.hljs-deletion {
	color: #c82829;
}

/* Tomorrow Orange */
.hljs-number,
.hljs-built_in,
.hljs-builtin-name,
.hljs-literal,
.hljs-type,
.hljs-params,
.hljs-meta,
.hljs-link {
	color: #f5871f;
}

/* Tomorrow Yellow */
.hljs-attribute {
	color: #eab700;
}

/* Tomorrow Green */
.hljs-string,
.hljs-symbol,
.hljs-bullet,
.hljs-addition {
	color: #718c00;
}

/* Tomorrow Blue */
.hljs-title,
.hljs-section {
	color: #4271ae;
}

/* Tomorrow Purple */
.hljs-keyword,
.hljs-selector-tag {
	color: #8959a8;
}

.hljs {
	display: block;
	overflow-x: auto;
	color: #4d4d4c;
	padding: 0.5em;
}

.hljs-emphasis {
	font-style: italic;
}

.hljs-strong {
	font-weight: bold;
}
</style>

<style>
/*
 * Markdown PDF CSS
 */

 body {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI", "Ubuntu", "Droid Sans", sans-serif, "Meiryo";
	padding: 0 12px;
}

pre {
	background-color: #f8f8f8;
	border: 1px solid #cccccc;
	border-radius: 3px;
	overflow-x: auto;
	white-space: pre-wrap;
	overflow-wrap: break-word;
}

pre:not(.hljs) {
	padding: 23px;
	line-height: 19px;
}

blockquote {
	background: rgba(127, 127, 127, 0.1);
	border-color: rgba(0, 122, 204, 0.5);
}

.emoji {
	height: 1.4em;
}

code {
	font-size: 14px;
	line-height: 19px;
}

/* for inline code */
:not(pre):not(.hljs) > code {
	color: #C9AE75; /* Change the old color so it seems less like an error */
	font-size: inherit;
}

/* Page Break : use <div class="page"/> to insert page break
-------------------------------------------------------- */
.page {
	page-break-after: always;
}

</style>

<script src="https://unpkg.com/mermaid/dist/mermaid.min.js"></script>
</head>
<body>
  <script>
    mermaid.initialize({
      startOnLoad: true,
      theme: document.body.classList.contains('vscode-dark') || document.body.classList.contains('vscode-high-contrast')
          ? 'dark'
          : 'default'
    });
  </script>
<p>README h-lua-sdk-doc</p>
<h2 id="%E5%BF%AB%E9%80%9F%E5%BC%80%E5%A7%8B">快速开始</h2>
<p>h-lua是一套完善的魔兽地图开发集成，更贴近程序开发者的使用套路。</p>
<p>摒弃手动物编，多余的excel物编，直接敲码绑定逻辑。</p>
<p>避免已知恶性问题，完善的马仔帮你调用API。 从建图到上线，一波跑通，不浪费时间。</p>
<h3 id="%E5%AE%89%E8%A3%85%E4%B8%80%E4%B8%AAfork-%E6%88%96-git">安装一个fork 或 git</h3>
<blockquote>
<p><a target="_blank" href="https://www.git-fork.com">Fork - a fast and friendly git client for Mac and Windows (git-fork.com)</a></p>
</blockquote>
<blockquote>
<p><a target="_blank" href="https://git-scm.com">Git (git-scm.com)</a></p>
</blockquote>
<h3 id="%E4%BB%A3%E7%A0%81%E7%BC%96%E8%BE%91%E5%99%A8">代码编辑器</h3>
<p>编辑器推荐使用Jetbrain Ideac(社区版免费) 并按照插件【EmmyLua】。</p>
<p>相信得到编辑器 Buff加成 的你，会如虎添翼~</p>
<blockquote>
<p><a target="_blank" href="https://www.jetbrains.com/idea/download/#section=windows">Ideac (Jetbrain)</a></p>
</blockquote>
<p><img src="https://github.com/hunzsig-warcraft3/h-lua-sdk/raw/gh-pages/img/emmylua.png" alt="Emmylua"></p>
<h3 id="%E5%85%8B%E9%9A%86%E4%B8%8B%E8%BD%BD%E9%A1%B9%E7%9B%AE">克隆（下载）项目</h3>
<pre class="hljs"><code><div>git clone https://github.com/hunzsig-warcraft3/h-lua-sdk
</div></code></pre>
<blockquote>
<p><a target="_blank" href="https://gitee.com/hunzsig/h-lua-sdk">可使用码云加速：(Gitee -&gt; h-lua-sdk)</a></p>
</blockquote>
<h3 id="%E6%89%93%E5%BC%80%E7%BB%88%E7%AB%AF%E5%B9%B6%E8%BF%9B%E5%85%A5%E5%B7%A5%E4%BD%9C%E5%8C%BA">打开终端并进入工作区</h3>
<pre class="hljs"><code><div>cd ./h-lua-sdk
</div></code></pre>
<h3 id="%E5%88%9B%E5%BB%BA%E6%96%B0%E9%A1%B9%E7%9B%AE">创建新项目</h3>
<pre class="hljs"><code><div>&gt; sdk.exe new demo
</div></code></pre>
<h3 id="%E4%BF%AE%E6%94%B9%E5%9C%B0%E5%BD%A2%E9%9D%9E%E5%BF%85%E8%A6%81">修改地形（非必要）</h3>
<pre class="hljs"><code><div>&gt; sdk.exe we demo
</div></code></pre>
<h3 id="%E6%B5%8B%E8%AF%95">测试</h3>
<pre class="hljs"><code><div>&gt; sdk.exe test demo
</div></code></pre>
<h3 id="%E6%8B%93%E5%B1%95%E4%BE%8B%E5%AD%90%E5%9C%B0%E5%9B%BE">拓展例子地图</h3>
<blockquote>
<p>拓展地图会编写一些业务，来引导你进行学习</p>
</blockquote>
<ul>
<li><a target="_blank" href="https://github.com/hunzsig-warcraft3/h-lua-sdk-helloworld">helloWorld</a></li>
<li><a target="_blank" href="https://github.com/hunzsig-warcraft3/h-lua-sdk-crash">压力测试</a></li>
<li><a target="_blank" href="https://github.com/hunzsig-warcraft3/h-lua-sdk-mysterious-land">秘地探奇半成品</a></li>
</ul>
<h3 id="%E5%AE%8C%E5%85%A8%E6%B2%92%E8%AF%95%E8%BF%87lua%E4%BD%9C%E5%9B%BE%E6%80%8E%E4%B9%88%E5%BF%AB%E9%80%9F%E5%AD%A6%E4%B9%A0">完全沒试过lua作图怎么快速学习？</h3>
<ul>
<li>了解lua基本语法： <a target="_blank" href="https://www.runoob.com/lua/lua-tutorial.html">Runoob Lua教学</a></li>
<li>了解YD引擎： 其他学习 -&gt; YDLua引擎</li>
<li>有魄力的人可以先略一遍 h-lua 的源码，即使你不用框架内实现，也是有所帮助的</li>
</ul>
<h2 id="%E7%9B%AE%E5%BD%95%E7%BB%93%E6%9E%84">目录结构</h2>
<pre class="hljs"><code><div>├── depend - 依赖的开发套件
│   ├── h-lua - h-lua(v:latest，随sdk更新的最新版)
│   ├── w3x2lni - w3x2lni工具(v:2.7.2)
│   └── YDWE - 马仔工具
├── projects - 用来放置你的地图项目目录，如 h-lua-sdk-helloworld
|   └── h-lua-sdk-helloworld
└── sdk.exe - sdk命令工具
</div></code></pre>
<h3 id="%E9%A1%B9%E7%9B%AE%E7%BB%93%E6%9E%84">项目结构</h3>
<pre class="hljs"><code><div>└── project_demo - 项目目录
├── hslk - 用来编写 hslk lua 物编配置, 不要把流程代码写里面
├── map - 地图文件
│   ├── implant - 用来强制更新替换【DZUI布局、命令位置、平衡性常数、原生界面】参数
│   ├── resource - F12导入
│   │   ├── hLua - h-lua需要的资源文件，请不要乱删除
│   │   ├── interface - 冷却时间UI，不需要可删除，然后需要修改 implant/war3mapSkin.txt
│   │   ├── ReplaceableTextures
│   │   ├── TerrainArt - 地形贴图，不需要可直接删除
│   │   │   ├── Cliff - 悬崖贴图，不需要可直接删除
│   │   │   ├── CommandButtonsDisabled - 暗图标目录
│   │   │   └── selection - 选择圈，不需要可直接删除
│   │   ├── UI - 命令等系统图形的修改（不包括dzui）不需要可删除，然后需要修改 implant/war3mapSkin.txt
│   │   ├── war3mapImported - 通用目录
│   │   └── war3mapMap.blp - 小地图文件，一般不会手动处理，交给 -yd
│   ├── slk - ini式的物编
│   └── w3x - 地图lni
├── scripts - lua脚本（*此乃建议，实际上你的lua只要在项目目录内，一般都能按路径访问）
└── main.lua - 项目代码入口
</div></code></pre>
<h2 id="%E5%91%BD%E4%BB%A4%E8%A1%8C">命令行</h2>
<h3 id="%E6%96%B0%E5%BB%BA%E9%A1%B9%E7%9B%AE">新建项目</h3>
<pre class="hljs"><code><div>&gt; sdk.exe new demo //新建一个地图项目，名为demo
</div></code></pre>
<h3 id="%E4%BD%BF%E7%94%A8we%E7%BC%96%E8%BE%91%E5%9C%B0%E5%BD%A2">使用WE编辑地形</h3>
<blockquote>
<p>编辑完后在使用test时会自动将改动记录回你的项目中</p>
</blockquote>
<pre class="hljs"><code><div>&gt; sdk.exe we demo //以WE打开项目demo，主要用于编辑地形
</div></code></pre>
<h3 id="%E6%A8%A1%E5%9E%8B%E6%89%B9%E9%87%8F%E6%9F%A5%E7%9C%8B">模型批量查看</h3>
<blockquote>
<p>模型默认scale1.00，方便对比</p>
</blockquote>
<pre class="hljs"><code><div>&gt; sdk.exe model demo //查看项目demo的模型，默认第0页
&gt; sdk.exe model demo 2 //查看项目demo的模型，第2页
&gt; sdk.exe model demo ttg //查看项目demo的模型，只要路径带有ttg的
&gt; sdk.exe model demo abc 1  //查看项目demo的模型，第1页且只要路径带有abc的
</div></code></pre>
<h3 id="%E6%B5%8B%E8%AF%95">测试</h3>
<blockquote>
<p>在test调试中，你可以直接F10重启魔兽获得脚本的更新，而无需再次使用test命令</p>
<p>重启脚本不包括hslk目录以及resource资源的变更，只对框架脚本或项目脚本有效</p>
</blockquote>
<pre class="hljs"><code><div>&gt; sdk.exe test demo //测试你的demo项目并测试
&gt; sdk.exe test demo ? //可以在后面加个问号，从而生成地图而不进行测试，一般用于检查物编的生成结果
</div></code></pre>
<h3 id="%E6%89%93%E5%8C%85">打包</h3>
<blockquote>
<p>在build调试中，F10重启魔兽不能获得脚本的更新，必须再次使用build命令</p>
<p>build命令会引用打包流程的lua脚本，DEBUGGING会自动置为false</p>
</blockquote>
<pre class="hljs"><code><div>&gt; sdk.exe build demo //打包你的demo项目并测试
&gt; sdk.exe build demo ? //可以在后面加个问号，从而生成地图而不进行测试，一般用于检查物编的生成结果
</div></code></pre>
<h3 id="%E6%B8%85%E7%90%86%E7%BC%93%E5%AD%98">清理缓存</h3>
<pre class="hljs"><code><div>&gt; sdk.exe clear demo //清理构建的临时文件
</div></code></pre>
<h2 id="%E6%9B%B4%E6%96%B0%E6%97%A5%E5%BF%97">更新日志</h2>
<h4 id="%E9%A1%B9%E7%9B%AE%E5%BD%93%E5%89%8D%E7%94%B1-xxqq9527-%E7%BB%A7%E7%BB%AD%E8%A2%AB%E5%8A%A8%E7%BB%B4%E6%8A%A4">项目当前由 xxqq9527 继续被动维护</h4>
<blockquote>
<p>2021/07 ~ 现在</p>
</blockquote>
<ul>
<li>chore(*): 优化</li>
<li>fix(*): 修复</li>
</ul>
<blockquote>
<p>2021/06</p>
</blockquote>
<ul>
<li>feat(debug): 新增handle监听</li>
<li>feat(attr): 新增吸魔 xxqq9527</li>
<li>feat(ttg): 飘浮字优化 xxqq9527</li>
<li>fix(monitor): 修复恢复监听器在满值无效的bug xxqq9527</li>
<li>fix(event): 修复一些事件参数相关bug xxqq9527</li>
<li>fix(skill): 修复bomb特效无效的问题 xxqq9527</li>
</ul>
<blockquote>
<p>2021/05</p>
</blockquote>
<ul>
<li>fix(event): 修复hslk系列bugs</li>
<li>fix(unit): 修复瞬间移动单位面向角度参数缺失bug</li>
<li>fix(sync): 修复同步参数错位问题</li>
</ul>
<blockquote>
<p>2021/04</p>
</blockquote>
<ul>
<li>feat(attr): 硬直开启判断及监听优化</li>
<li>feat(sync): 加入同步</li>
<li>feat(attr): 三围属性关联删除，现在支持大部分属性的成长关联 attr</li>
<li>feat(table/hero/skill): 新增几个函数</li>
<li>feat(hero): 修正经验计算</li>
<li>feat(attr): 优化攻击间隔逻辑</li>
<li>feat(attr): 删除xtras里面一些没什么用的事件支持</li>
<li>feat(event): 玩家伤害数据记录修正</li>
<li>feat(timer): 计时器新增暂停/恢复方法</li>
<li>feat(sound): 新增调节bgm音量</li>
<li>feat(sound): voiceCreate方法新增参数is3D</li>
<li>feat(dzui): 删除一大批没什么必要的函数</li>
<li>feat(hslk): 全面支持英雄技能,新增i18n可自定义部分文本</li>
<li>feat(hslk): 新增hslk_item_fleeting函数，hslk_item增加_onItemGet、hslk_ability增加_onSkillStudy</li>
<li>feat(math): 两位置角度限制范围返回[0-360]</li>
<li>fix(sdk): 修复build无响应问题</li>
<li>fix(attr): 修改伤害数据的获取模式</li>
<li>fix(model): 暴击默认模型路径错误</li>
<li>fix(damage): 修正没有伤害也触发暴击特效的问题</li>
<li>fix(damage): 修复硬直恢复失衡</li>
<li>chore(*): 删除implant，不再主动支持war3mapMisc.txt</li>
<li>chore(hslk): 默认单位杜绝恢复</li>
<li>chore(hslk): 默认单位ID改为熊猫（无技能1倍缩放255颜色）</li>
</ul>
<blockquote>
<p>2021/03</p>
</blockquote>
<ul>
<li>优化 | V1版本进入维护修bugs阶段，V2版本后成为SDK项目的子库</li>
<li>feat(skill): damage嵌入原生伤害类型</li>
<li>feat(texttag): model型漂浮字</li>
<li>feat(ring): 调整ring的生效逻辑</li>
<li>feat(japi): 完备JAPI</li>
<li>fix(sdk): 修复_attr disabled无效果的问题</li>
<li>fix(monitor/unit): 修复魔法恢复无效的bug</li>
<li>chore(slk): 修正lua基准库的执行流程</li>
</ul>
<blockquote>
<p>2021/02</p>
</blockquote>
<ul>
<li>chore(sdk): new hslk</li>
<li>chore(sdk): new tools</li>
<li>致命 | onChat事件优化及重做</li>
<li>致命 | 镜头提升/下降指令改为-d，使用为-d +100[提升100距离]</li>
<li>致命 | 淡化runtime</li>
<li>功能 | 新模块cache、monitor</li>
<li>功能 | 总属性在使用set时支持自动变换为绿字</li>
<li>优化 | 重做并优化满金币自动换木头的逻辑</li>
</ul>
<blockquote>
<p>2021/01</p>
</blockquote>
<ul>
<li>致命 | 删除了实际无用的三个属性：冥想力meditative、幸运luck和救助力help</li>
<li>致命 | 删除player自带的黄金木头获取漂浮字，新增资源变动事件，交由作者自行编写</li>
<li>致命 | 删除unit自带的经验漂浮字，新增单位获得经验事件，交由作者自行编写</li>
<li>致命 | 参数high改为height</li>
<li>致命 | 新增黑色玩家颜色、敌人模块重做，现在配置更简单并且支持多势力</li>
<li>致命 | loop方法统一改名为forEach，并且回调都以(val, idx)的配置返回</li>
<li>致命 | includes、delete方法参数顺序改得与lua默认函数相似</li>
<li>致命 | 框架现在不处理护甲属性，全部交予原生处理</li>
<li>致命 | 新增总护甲属性defend（只读）,现在护甲分白绿:defend_white/defend_green</li>
<li>致命 | 修复了一些有可能造成异步的潜在bug</li>
<li>功能 | xtras支持负动态映射数值</li>
<li>功能 | leap现在支持横纵偏移</li>
<li>功能 | 新模块物品池</li>
<li>功能 | 新增属性：攻击范围attack_range，攻击间隔attack_space</li>
<li>优化 | 重做单位RGBA颜色</li>
<li>优化 | 现在attr返回的攻击间隔不再是初始间隔而是根据攻速变幻的每秒间隔数据</li>
<li>优化 | 调整了丢弃物品触发的时机，事实上物品事件基本已重做</li>
<li>优化 | 遮罩mark增加一个空判断</li>
<li>优化 | slkHelper物品的叠加数现在下限起码是使用次数</li>
<li>优化 | 修复整数属性在小数扣除时有可能多出额外属性的bug</li>
<li>优化 | 优化shadow物品的名称</li>
</ul>
<blockquote>
<p>2020/12</p>
</blockquote>
<ul>
<li>致命 | slk与hslk分离</li>
<li>致命 | 自然属性参数全部删除</li>
<li>致命 | 彻底删除了自带的镜头模式</li>
<li>功能 | 新增附魔、附魔反应；属性系统与附魔连通</li>
<li>功能 | 新增商店模块</li>
<li>功能 | 新增buff模块</li>
<li>优化 | 英雄不再根据主属性赋予攻击伤害类型</li>
</ul>
<blockquote>
<p>2020/11</p>
</blockquote>
<ul>
<li>致命 | slkHelper的自定义键值统一为：以下划线开头小写作key</li>
<li>致命 | 伤害系统大改：删除了伤害种类，新增伤害来源等</li>
<li>致命 | 属性系统的特效重做，新设xtras</li>
<li>功能 | 新增n2i系列函数，名称获得ID</li>
<li>功能 | 事件event与新的xtras连通</li>
<li>功能 | 新增新属性：总攻击、攻击间隔、力量、敏捷、智力、减伤（%）、自身暴击</li>
<li>优化 | 删除了&quot;被/造成无法回避的伤害&quot;事件</li>
</ul>
<blockquote>
<p>2020/10</p>
</blockquote>
<ul>
<li>致命 | 现在物品创建不再支持设定物品的栏目位置</li>
<li>致命 | 修复部分range没有改名为radius的问题</li>
<li>致命 | 修复attr对象类型添加时key获取错误的问题</li>
<li>优化 | 优化合成/拆分的执行效率</li>
<li>优化 | 光环目标判定新增enemy目标，与enemies同效果</li>
<li>优化 | slkHelper信使的自动技能改为局部参数</li>
</ul>
<blockquote>
<p>2020/09</p>
</blockquote>
<ul>
<li>致命 | 为辨明范围的距离，涉及的参数名或回调数据不再使用“range”改为“radius/diameter”半径或直径来处理</li>
<li>致命 | [hero]修复设置玩家英雄最大数无效的bug</li>
<li>致命 | 修复物品拆分bugs</li>
<li>致命 | ID_ARRAY参数改名</li>
<li>功能 | slkHelper信使技能拓展，新增四个框架信使行为事件:(闪烁,范围拾取,拆分,批量传送)</li>
<li>功能 | event新增移动捕捉的相关事件</li>
<li>功能 | 新增matcher</li>
<li>功能 | slkHelper[光环]技能的完善（相关bug可看项目历史）</li>
<li>功能 | is模块部分判断函数名改为更贴近原生j,新增sapper判断自爆工兵</li>
<li>优化 | 物品拆分等功能继续完善</li>
<li>优化 | 整合并优化物品/技能属性计算</li>
</ul>
<blockquote>
<p>2020/08</p>
</blockquote>
<ul>
<li>致命 | 修复设置魔法百分比却设置到生命值的bug</li>
<li>致命 | 删除了h-lua的变身技能</li>
<li>致命 | 修复event删除事件的bug</li>
<li>致命 | 修复event一个BJ误用错误，现在改回CJ</li>
<li>致命 | 修复event[Esc]事件错误</li>
<li>致命 | 修复生命魔法的恢复器有可能出错的问题</li>
<li>致命 | 修复print_mbr部分打印没有正确显示中文的问题</li>
<li>致命 | 修复硬直已经补满了依然增加的bug</li>
<li>功能 | slkHelper现在支持一些简易的自定义设定，如文本颜色等</li>
<li>功能 | shadow物品（默认开启）</li>
<li>功能 | 物品合成、拆分（相关bug可看项目历史）</li>
<li>功能 | 强化物品使用事件，现在物品技能如有可能，可以获取释放的目标坐标/目标单位</li>
<li>优化 | runtime的精简和优化</li>
<li>优化 | hevent.POOL现在可以归nil</li>
<li>优化 | 英雄重生方法增加一个如果已经复活则跳过的逻辑</li>
<li>优化 | 修正超重提示的小数点溢出</li>
<li>优化 | 现在 print_r 会显示数值类型</li>
</ul>
<blockquote>
<p>2020/07</p>
</blockquote>
<ul>
<li>致命 | 修复onBeAttack的triggerUnit数据错误</li>
<li>功能 | 增加一个0秒无敌的致命抵抗，减少生命技能的性能负担</li>
<li>优化 | 删除Dzapi一行多余的代码</li>
</ul>
<blockquote>
<p>2020/06</p>
</blockquote>
<ul>
<li>致命 | 修复硬直不会自动补充的bug，修复被击硬直计算不实时的问题（顺便优化并修正了硬直的判断准则）</li>
<li>致命 | 修复hero.levelUp无效的bug</li>
<li>功能 | 增加his两个判断：背向对与正面对</li>
<li>功能 | 新增[可破坏物被破坏]事件</li>
<li>功能 | slkHelper新增[光环]技能</li>
<li>功能 | 新增matchUsed方法，使物品使用绑定更快更优雅</li>
<li>功能 | 新增[暂停]、[恢复]单位方法</li>
<li>优化 | leap和crashFly的地图边界问题</li>
<li>优化 | 优化slkHelper的item</li>
<li>优化 | hunit创建现在可以带一个attr设定，顺便设置属性</li>
</ul>
<blockquote>
<p>2020/05/31</p>
</blockquote>
<ul>
<li>功能 | 去掉了格式化里W（万）这个数值单位</li>
</ul>
<blockquote>
<p>2020/05/30</p>
</blockquote>
<ul>
<li>致命 | 修复一个runtime空值bug</li>
</ul>
<blockquote>
<p>2020/05/26</p>
</blockquote>
<ul>
<li>优化 | print_mb现在和print一样支持多个参数</li>
</ul>
<blockquote>
<p>2020/05/25</p>
</blockquote>
<ul>
<li>优化 | 单位的初始化，英雄的初始化以及判断的自动化</li>
</ul>
<blockquote>
<p>2020/05/19</p>
</blockquote>
<ul>
<li>功能 | hero模块构建酒馆内实现增强</li>
</ul>
<blockquote>
<p>2020/05/18</p>
</blockquote>
<ul>
<li>优化 | 重做了dzapi服务器清理server.clear</li>
</ul>
<blockquote>
<p>2020/05/17</p>
</blockquote>
<ul>
<li>致命 | slkhelper增加内置方法与hRuntime结合构建物编对象</li>
<li>优化 | 修改了math.numberFormat的单位</li>
</ul>
<blockquote>
<p>2020/05/14</p>
</blockquote>
<ul>
<li>优化 | F9提示优化，并增加all参数，一key全配置</li>
<li>优化 | table.merge方法支持动态参数(多table简单合并)</li>
</ul>
<blockquote>
<p>2020/05/09</p>
</blockquote>
<ul>
<li>致命 | 更多地框架内实现，group不再使用原生方法进行选取单位，可以选取到hunit.create的所有单位(如果原来就使用框架内create方法，几乎对现有功能无影响)</li>
</ul>
<blockquote>
<p>2020/05/08</p>
</blockquote>
<ul>
<li>致命 | event优化pool的处理，优化掉了框架拓展trigger的引用</li>
<li>优化 | 初始化合并,优化dzapi关闭时的提示，优化掉了框架拓展trigger的引用</li>
</ul>
<blockquote>
<p>2020/05/07</p>
</blockquote>
<ul>
<li>优化 | 新增item模块瞬逝物fleeting方法</li>
</ul>
<blockquote>
<p>2020/05/06</p>
</blockquote>
<ul>
<li>功能 | 新增多频对单位伤害技能 hskill.damageStep</li>
<li>优化 | 修改bgm的播放逻辑流程(改善了bgm的播放顺序效率)</li>
</ul>
<blockquote>
<p>2020/05/05</p>
</blockquote>
<ul>
<li>致命 | 修复quest离奇大小写导致任务全部是&quot;未发现&quot;的bug</li>
<li>致命 | 修复眩晕技能，计时器参数调用错误的bug(会导致多次眩晕直接报错)</li>
<li>功能 | sound模块删除了绑定点音效，新增绑定区域音效</li>
<li>功能 | 新增方法 his.inRect 判断是否在区域内</li>
<li>优化 | 删除了h-lua默认的F9任务（需要的可自行调用）</li>
</ul>
<blockquote>
<p>2020/05/04</p>
</blockquote>
<ul>
<li>致命 | 修复bgm停止后可能无法再次播放的bug</li>
</ul>
<blockquote>
<p>2020/05/01</p>
</blockquote>
<ul>
<li>致命 | 复活的方法从unit转到了hero模块</li>
</ul>
<blockquote>
<p>2020/04/30</p>
</blockquote>
<ul>
<li>致命 | 修复了一个神奇的heroPick事件调用错误</li>
<li>功能 | 新增三围主属性对白字攻击的影响</li>
<li>功能 | 现在遮罩自带一些贴图并支持RGB颜色</li>
<li>优化 | 修改了hero的底层判断方式（不影响his.hero的使用）</li>
</ul>
<blockquote>
<p>2020/04/29</p>
</blockquote>
<ul>
<li>致命 | 现在time模块不再支持原生计时器对象的获取时间了，全部改为框架自实现</li>
<li>致命 | 修复timer索引有误的bug（可能导致计时器无法删除）</li>
<li>致命 | 修复胜利失败不会自动结束游戏的问题</li>
<li>致命 | 修复物品事件无法注册的bug</li>
<li>优化 | 继续完善英雄选择</li>
</ul>
<blockquote>
<p>2020/04/26</p>
</blockquote>
<ul>
<li>优化 | 调整skill的damage，现在伤害动作可以没有伤害来源</li>
</ul>
<blockquote>
<p>2020/04/25</p>
</blockquote>
<ul>
<li>致命 | 修复is模块的时间判断bug，修复天气模块的一些bug</li>
<li>致命 | 删除mark模块（遮罩）归并到新增的texture模块</li>
<li>优化 | 修复了一些技能边界问题</li>
</ul>
<blockquote>
<p>2020/04/23 - 24</p>
</blockquote>
<ul>
<li>致命 | message模块删除，echo方法现在是全局方法，同时合并实现echo00等方法</li>
<li>优化 | hero模块重构</li>
<li>优化 | env模块重构（迷雾方法现在归属在env模块）</li>
</ul>
<blockquote>
<p>2020/04/22</p>
</blockquote>
<ul>
<li>优化 | 更优质的事件顺序编排</li>
</ul>
<blockquote>
<p>2020/04/20</p>
</blockquote>
<ul>
<li>致命 | 不再内置BJ文件，如需使用，自行补充和引用</li>
</ul>
<blockquote>
<p>2020/04/15 - 20</p>
</blockquote>
<ul>
<li>致命 | 删除了event的onSummon（被召唤）事件</li>
<li>致命 | 修复击飞目标参数错误的bug</li>
<li>功能 | 新增被反伤事件</li>
<li>优化 | 删除了上下左右和选择单位对apm的影响</li>
<li>优化 | event充分利用pool，重构大部分的方法</li>
</ul>
<blockquote>
<p>2020/04/14</p>
</blockquote>
<ul>
<li>致命 | - 修复event区域进入离开参数错误的bug</li>
</ul>
<blockquote>
<p>2020/03/31</p>
</blockquote>
<ul>
<li>功能 | - 整合随机数</li>
</ul>
<blockquote>
<p>2020/03/30</p>
</blockquote>
<ul>
<li>致命 | - 修复一个物品拾取事件变量[pickup]命名丢失错误</li>
</ul>
<blockquote>
<p>2020/03/28</p>
</blockquote>
<ul>
<li>优化 | - 利用event注册池，动态注册事件动态分配，极大降低框架默认注册崩溃的可能性</li>
</ul>
<blockquote>
<p>2020/03/23</p>
</blockquote>
<ul>
<li>致命 | - 修复unit.del持续时间为0的注册单位变量无法释放的问题</li>
</ul>
<blockquote>
<p>2020/03/22</p>
</blockquote>
<ul>
<li>优化 | - 重实现整理DZapi</li>
</ul>
<blockquote>
<p>2020/03/16</p>
</blockquote>
<ul>
<li>功能 | - 增加一个商城作弊法</li>
<li>优化 | - strpos现在找不到返回false而不是-1</li>
</ul>
<blockquote>
<p>2020/03/06</p>
</blockquote>
<ul>
<li>功能 | - string新增一个strpos方法</li>
<li>优化 | - 优化isOwnItem,现在同时支持int和string类型的id</li>
</ul>
<blockquote>
<p>2020/02/29</p>
</blockquote>
<ul>
<li>优化 | - 整合区间距离计算</li>
</ul>
<blockquote>
<p>2020/02/24 ~ 27</p>
</blockquote>
<ul>
<li>优化 | - 计时器与窗口分离，去除计时器调用时的闭包泄漏</li>
<li>优化 | - 改变filter的使用，用来解决group的闭包泄漏</li>
<li>优化 | - 重做物品拾取方法，改成框架自实现，不再使用jass方法，用来解决引擎闭包泄漏</li>
</ul>
<blockquote>
<p>2020/02/22</p>
</blockquote>
<ul>
<li>致命 | - 弃用pairs</li>
</ul>
<blockquote>
<p>2020/02/19</p>
</blockquote>
<ul>
<li>优化 | - time模块新增一个池，用于计时器handle的复用，经测试计时器即使删除内存也不释放，此举解决了内存溢出的问题</li>
<li>功能 | - time模块delDialog方法删除，现在调用delTimer会自动删除对话框，而回调也不再提供dialog的handle</li>
</ul>
<blockquote>
<p>2020/02/18</p>
</blockquote>
<ul>
<li>功能 | - 现在debug文件里自带调试开启，并且进行了常规错误的捕获，更方便突发测试，自动调试在打包时会自动删除</li>
</ul>
<blockquote>
<p>2020/02/17</p>
</blockquote>
<ul>
<li>优化 | - texttag设置了一个limit值作用限制上限，解决lua调用jass函数无效却占用资源丢失跟踪无法释放内存的问题</li>
</ul>
<blockquote>
<p>2020/02/15</p>
</blockquote>
<ul>
<li>功能 | - 新增打包package工具用于上线,复制exampleini,双击package打包</li>
<li>优化 | - 统合group</li>
</ul>
<blockquote>
<p>2020/02/14</p>
</blockquote>
<ul>
<li>致命 | - 重构dzapi！现在有个plugin文件复制到触发开启dzapi</li>
<li>功能 | - 新增一个玩家离开游戏的事件</li>
</ul>
<blockquote>
<p>2020/02/13</p>
</blockquote>
<ul>
<li>功能 | - 新增is两个判断：单位是否已被删除,单位是否正在受伤</li>
</ul>
<blockquote>
<p>2020/02/12</p>
</blockquote>
<ul>
<li>致命 | - 优化加载步骤，不再需要构建初始化触发器执行作弊码指令</li>
<li>致命 | - 删除了区域注册的初始化过程，转移至hunit(以后不通过hunit来创建单位就不会被系统识别)</li>
<li>功能 | - hunit.create新增register,isOpenSolt参数，可以控制是否注册和注册物品栏</li>
<li>功能 | - 新增获取排行榜名次玩家的3个方法</li>
<li>功能 | - 新增玩家名称处理的2个方法</li>
</ul>
<blockquote>
<p>2020/02/10</p>
</blockquote>
<ul>
<li>功能 | - player模块新增一个隐藏所有单位方法</li>
</ul>
<blockquote>
<p>2020/02/09</p>
</blockquote>
<ul>
<li>致命 | - 修复缴械对象获取错误的bug</li>
<li>致命 | - 修复is.get错误的bug</li>
</ul>
<blockquote>
<p>2020/02/08</p>
</blockquote>
<ul>
<li>致命 | - 修复了之前改动的眩晕以致有时无效的bug</li>
<li>功能 | - string 新增方法 vkey,attr调用此方法，提升set的效率大概20倍</li>
<li>优化 | - 反伤数值机制精度为0.01,小于0.01无效</li>
</ul>
<blockquote>
<p>2020/02/06</p>
</blockquote>
<ul>
<li>优化 | - 物品属性系统的完成及内存优化</li>
</ul>
<blockquote>
<p>2020/02/05</p>
</blockquote>
<ul>
<li>优化 | - 部分attr的slk方法转移至slk-helper</li>
</ul>
<blockquote>
<p>2020/02/04</p>
</blockquote>
<ul>
<li>致命 | - math删除了两个已经无用的函数 oddsItem coverAttrEffectVal</li>
<li>功能 | - 新增一个quest模块</li>
<li>功能 | - debug新增rem方法，用于检测执行时间</li>
<li>优化 | - 修复hluaF9事件错误的bug</li>
</ul>
<blockquote>
<p>2020/02/02</p>
</blockquote>
<ul>
<li>功能 | - 新增一个方法判断是否隐身</li>
<li>优化 | - 无敌的作用机制改为技能的Avul</li>
<li>优化 | - 删除了源的框架属性设定</li>
<li>优化 | - 优化SLK预读</li>
</ul>
<blockquote>
<p>2020/02/01</p>
</blockquote>
<ul>
<li>优化 | - 删除了全局注册这个事件</li>
<li>优化 | - 排行榜现在自动根据数值降序</li>
</ul>
<blockquote>
<p>2020/01/31</p>
</blockquote>
<ul>
<li>功能 | - item新增方法pick</li>
</ul>
<blockquote>
<p>2020/01/30</p>
</blockquote>
<ul>
<li>致命 | - 修复attr没有处理护甲和魔抗在伤害中比率的问题</li>
</ul>
<blockquote>
<p>2020/01/29</p>
</blockquote>
<ul>
<li>优化 | - runtime的gc</li>
<li>优化 | - 黄金木材资源的ratio生效机制更改，现只需要调用add方法会自动结合比率计算，如果add方法设定了单位，还会自动展示漂浮字</li>
<li>优化 | - 漂浮字的动画和呈现的效率</li>
</ul>
<blockquote>
<p>2020/01/27</p>
</blockquote>
<ul>
<li>致命 | - 修复attr-effect不能正确删除的bug</li>
<li>功能 | - 新增一个蝗虫的is判断</li>
<li>优化 | - 超过漂浮字上限的优化处理</li>
</ul>
<blockquote>
<p>2020/01/26</p>
</blockquote>
<ul>
<li>优化 | - 新增一个group方法loop，新增一个技能，矩形打击</li>
</ul>
<blockquote>
<p>2020/01/25</p>
</blockquote>
<ul>
<li>优化 | - 伤害增幅的key改为damage_extent</li>
</ul>
<blockquote>
<p>2020/01/24</p>
</blockquote>
<ul>
<li>鼠年快乐！</li>
</ul>
<blockquote>
<p>2020/01/23</p>
</blockquote>
<ul>
<li>致命 | - 修复了attr对于string数值处理不妥的bug</li>
<li>功能 | - 新增技能leapReflex</li>
</ul>
<blockquote>
<p>2020/01/22</p>
</blockquote>
<ul>
<li>致命 | - 修复小数缓存的微妙差值bug</li>
<li>功能 | - 新增属性：神/神抗</li>
<li>优化 | - 修复swim技能damageType获取错误对象的bug</li>
</ul>
<blockquote>
<p>2020/01/20</p>
</blockquote>
<ul>
<li>功能 | - 新增unit方法，设置单位的动画速度</li>
</ul>
<blockquote>
<p>2020/01/19</p>
</blockquote>
<ul>
<li>功能 | - 新增string方法：子串统计</li>
<li>功能 | - 反伤增加无敌判定(无敌不会被反伤)</li>
</ul>
<blockquote>
<p>2020/01/18</p>
</blockquote>
<ul>
<li>致命 | - 修复event的handle对象错误bug</li>
<li>功能 | - 新增一个string方法，用于重复字符串</li>
</ul>
<blockquote>
<p>2020/01/17</p>
</blockquote>
<ul>
<li>重构 | - 增加了一个常规伤害的设定</li>
<li>致命 | - 修复一部分属性小数精度丢失的bug</li>
<li>功能 | - 分裂、物理暴击、魔法暴击现在不属于常规属性，改为effect类型</li>
</ul>
<blockquote>
<p>2020/01/16</p>
</blockquote>
<ul>
<li>功能 | - 属性系统的伤害动作全部与skill的合并，现在只需要使用hskill.damage,而hattr.huntUnit则被删除</li>
</ul>
<blockquote>
<p>2020/01/15</p>
</blockquote>
<ul>
<li>功能 | - 新增leap拓展技能leapRange</li>
<li>功能 | - 新增技能：隐身/现形，优化hskill及hattr</li>
<li>功能 | - 修复effect一些关于更新迭代的bug</li>
</ul>
<blockquote>
<p>2020/01/14</p>
</blockquote>
<ul>
<li>致命 | - 修复start.lua错误判断蝗虫存在的bug</li>
<li>致命 | - 修复math的bug</li>
<li>功能 | - 无敌和群体无敌技能，增加一个可以设置特效的参数</li>
<li>功能 | - leap技能重做，修复math库的bug</li>
<li>功能 | - 新增leap拓展技能pow</li>
</ul>
<blockquote>
<p>2020/01/13</p>
</blockquote>
<ul>
<li>功能 | - 新增dzapi封装、unit方法</li>
<li>功能 | - 新增技能，剑刃风暴</li>
</ul>
<blockquote>
<p>2020/01/12</p>
</blockquote>
<ul>
<li>重构 | - damage函数的优化</li>
<li>致命 | - 修复眩晕技能持续时间过短时，无法准确删除buff的bug</li>
<li>功能 | - 新增玩家方法get/set称号</li>
<li>优化 | - 修复属性系统临时增加的物品栏没被删除的bug</li>
<li>优化 | - 增加一个魔爆特效</li>
<li>优化 | - 修复新版事件触发技能事件有可能获取数据错误的bug</li>
</ul>
<blockquote>
<p>2020/01/11</p>
</blockquote>
<ul>
<li>重构 | - hevent模块重做，影响获取回调数据的方式</li>
</ul>
<blockquote>
<p>2020/01/10</p>
</blockquote>
<ul>
<li>功能 | - 新增一个修改单位颜色的方法</li>
<li>优化 | - 排行榜的数据设定法修改(改成和多面板差不多)</li>
</ul>
<blockquote>
<p>2020/01/09</p>
</blockquote>
<ul>
<li>致命 | - 修复了闪电效果的无效偏移bug及技能闪电链的一些bug</li>
<li>功能 | - group新增获取最近单位方法，skill闪电链优化单位选取(最近的敌人)</li>
</ul>
<blockquote>
<p>2020/01/08</p>
</blockquote>
<ul>
<li>重构 | - hlogic模块直接删除，转为基本库的math</li>
<li>重构 | - mark模块重做，同时修复一些BJ问题</li>
<li>致命 | - 修复属性系统视野，绿字攻击，攻速，护甲的减除bug</li>
<li>致命 | - 修复slk攻速技能数值错误的问题</li>
<li>致命 | - 修复负护甲负魔抗失效的bug</li>
<li>优化 | - 调节多面板的图标占位</li>
<li>优化 | - 修复BJ、player bug</li>
</ul>
<blockquote>
<p>2020/01/07</p>
</blockquote>
<ul>
<li>功能 | - 新增table模块，而system被拆分为table和string，不复存在</li>
<li>功能 | - 新增string基本库，原来的idchar转换方法从system删除，内置于string</li>
<li>功能 | - 新增多面板，排行榜增加两个设定参数的方法,修复一个skill的bug</li>
<li>功能 | - group新增坐标法，优化原有的点、单位创建</li>
<li>功能 | - unit增加一个方法获取单位名字</li>
<li>功能 | - 增加了一个技能【范围眩晕】</li>
<li>优化 | - 修改effect、buff的特效作用顺序</li>
<li>优化 | - 优化单位、物品的id问题</li>
</ul>
<blockquote>
<p>2020/01/06</p>
</blockquote>
<ul>
<li>重构 | - skill大更新，部分技能改为options参数模式,眩晕等技能现在自动对抵抗作出反应</li>
<li>优化 | - 修复了新版table层次不正确的bug</li>
<li>优化 | - 属性系统的实现，MD5的调用</li>
<li>优化 | - 修正buff的删除</li>
</ul>
<blockquote>
<p>2020/01/05</p>
</blockquote>
<ul>
<li>重构 | - 属性系统大更新</li>
</ul>
<blockquote>
<p>2020/01/04</p>
</blockquote>
<ul>
<li>功能 | - 现在创建物品时如果是给予单位，可选物品的位置</li>
<li>优化 | - 修复了删除技能必须要设置during的不人性化问题</li>
</ul>
<blockquote>
<p>2020/01/03</p>
</blockquote>
<ul>
<li>致命 | - 修复了hattr力敏智的计算出错的bug</li>
<li>功能 | - 自然属性新增“虫”insect属性</li>
</ul>
<blockquote>
<p>2020/01/01</p>
</blockquote>
<ul>
<li>致命 | - 修复属性系统的特性bug</li>
<li>功能 | - 现在hevent的GetTriggerSkill返回的不再是handleID而是charID</li>
<li>功能 | - award模块与unit连通(主要是exp的改动)</li>
<li>优化 | - 修复buff/debuff无效的bug（key错误）</li>
<li>优化 | - 修复了一些unit模块的bug</li>
</ul>
<blockquote>
<p>2019/12/31</p>
</blockquote>
<ul>
<li>优化 | - 修复了hColor亮紫色颜色错误的bug</li>
</ul>
<blockquote>
<p>2019/12/30</p>
</blockquote>
<ul>
<li>优化 | - 修改item获取slk的部分方法,getAvatar改为getArt（获取图标）,getModel改为getFile（获取模型路径）</li>
</ul>
<blockquote>
<p>2019/12/29</p>
</blockquote>
<ul>
<li>优化 | - 修复一个关于玩家胜利失败的BJbug</li>
</ul>
<blockquote>
<p>2019/12/25</p>
</blockquote>
<ul>
<li>功能 | - dialog现在支持table的buttons，同时会自动识别设置的key指，可能的话作为热键</li>
<li>功能 | - 优化物品，修复自动物品不会触发使用事件的bug</li>
<li>功能 | - 优化system的错误提示</li>
<li>功能 | - 新增hhero方法：设置英雄当前等级</li>
</ul>
<blockquote>
<p>2019/12/24</p>
</blockquote>
<ul>
<li>功能 | - 优化一些拥有持续时间的函数，during可以不填</li>
<li>功能 | - 对话框现在支持关联table及序列table</li>
<li>优化 | - 修复玩家获取地图区域调用了BJ函数的问题</li>
</ul>
<blockquote>
<p>2019/12/23</p>
</blockquote>
<ul>
<li>功能 | - 增强debug(mb方法)</li>
<li>功能 | - his新增判断是否敌军、友军的方法</li>
</ul>
<blockquote>
<p>2019/12/22</p>
</blockquote>
<ul>
<li>功能 | - 新增物品的满格、超重事件、属性计算</li>
<li>优化 | - 修复runtime的参数重名bug，优化item和unit的slk数据获取</li>
</ul>
<blockquote>
<p>2019/12/21</p>
</blockquote>
<ul>
<li>功能 | - htime最重要的两个计时器方法的参数顺序变更，优化nil的编写</li>
<li>功能 | - 现在system的print_r归到debug里面去了</li>
<li>优化 | - 删除系统默认的空冷却slk</li>
</ul>
<blockquote>
<p>2019/12/20</p>
</blockquote>
<ul>
<li>功能 | - skills删除了0秒无敌（合并到无敌的方法去了）</li>
<li>功能 | - slk新增一棵树，修复镜头有几率出错的bug</li>
<li>功能 | - 新增一波技能的通用方法(添加、删除)</li>
<li>优化 | - 修复BJ函数错误</li>
</ul>
<blockquote>
<p>2019/12/18</p>
</blockquote>
<ul>
<li>功能 | - effect现在只支持&gt;=0（0为删除型特效调用法）</li>
<li>优化 | - 修复已知的bug</li>
</ul>
<blockquote>
<p>2019/12/16</p>
</blockquote>
<ul>
<li>功能 | - 现在onLevelUp事件支持获取提升了的等级差</li>
<li>优化 | - 修了很多bug（sound、event、hero、player等）</li>
</ul>
<blockquote>
<p>2019/12/15</p>
</blockquote>
<ul>
<li>功能 | - 加入leaderBoard（排行榜）功能</li>
<li>优化 | - 修复了is库使用了BJ函数导致的bug</li>
<li>优化 | - 修复技能、属性系统，飘浮字，事件一些bug，优化一些效果</li>
<li>优化 | - 调整默认的奖励范围，删除一些调试</li>
<li>优化 | - 修复玩家金钱木材设置无效的bug</li>
<li>优化 | - 修复runtime bug</li>
<li>优化 | - 同步unit库在其他库中的引用</li>
</ul>
<blockquote>
<p>2019/12/13</p>
</blockquote>
<ul>
<li>优化 | - 修复计时器一次性时窗口不显示的bug</li>
</ul>
<blockquote>
<p>2019/12/12</p>
</blockquote>
<ul>
<li>致命 | - 修复创建单位初始index不正确的bug</li>
<li>致命 | - 修复 timer bug</li>
<li>功能 | - 加入dialog（对话框），用更精简的方法优化msg</li>
<li>功能 | - 删除无用的技能空冷却，增加一个栈信息打印方便调试，优化代码中判断</li>
</ul>
<blockquote>
<p>2019/02/21 ~ 2019/10/11</p>
</blockquote>
<ul>
<li>功能 | - 功能补充</li>
</ul>
<blockquote>
<p>2019/02/21</p>
</blockquote>
<ul>
<li>start</li>
</ul>
<p>:<a href="">功能库</a></p>
<h2 id="api%E5%A4%A7%E5%85%A8">API大全</h2>
<ul>
<li>[B]blizzard.lua</li>
<li>[L]<strong>console\build.lua</strong></li>
</ul>
<pre class="hljs"><code><div>print(...)
print_stack(...)
print_mb(...)
print_err(val)
print_r(t, printMethod, showDetail)
print_mbr(t)
</div></code></pre>
<ul>
<li>[L]<strong>console\hslk.lua</strong></li>
</ul>
<pre class="hljs"><code><div>rem(key1, key2)
print_stack(...)
print_r(t)
sub_print_r(tt, indent)
</div></code></pre>
<ul>
<li>[L]<strong>console\test.lua</strong></li>
</ul>
<pre class="hljs"><code><div>JassRuntime.error_handle(msg)
print(...)
print_stack(...)
print_mb(...)
print_err(val)
print_r(t, printMethod, showDetail)
sub_print_r(tt, indent)
print_mbr(t)
</div></code></pre>
<ul>
<li>[B]const\abilityTarget.lua</li>
<li>[B]const\attribute.lua</li>
<li>[B]const\attributeXtras.lua</li>
<li>[B]const\breakArmorType.lua</li>
<li>[B]const\cache.lua</li>
<li>[B]const\damageSource.lua</li>
<li>[B]const\damageType.lua</li>
<li>[B]const\enchant.lua</li>
<li>[B]const\event.lua</li>
<li>[B]const\hero.lua</li>
<li>[B]const\hotKey.lua</li>
<li>[B]const\item.lua</li>
<li>[B]const\keyboard.lua</li>
<li>[B]const\monitor.lua</li>
<li>[B]const\target.lua</li>
<li>[B]const\textTag.lua</li>
<li>[L]<strong>const\ubertip.lua</strong></li>
</ul>
<pre class="hljs"><code><div>CONST_UBERTIP_TARGET_LABEL(target, actionType, actionField, isValue)
CONST_UBERTIP_IS_PERCENT(key)
CONST_UBERTIP_IS_LEVEL(key)
CONST_UBERTIP_ATTR_XTRAS(data, indent)
CONST_UBERTIP_ATTR(attr, sep, indent)
CONST_UBERTIP_RING_ABILITY(data)
CONST_UBERTIP_RING_ITEM(data)
CONST_RESEARCH_UBERTIP_ATTR(attr)
CONST_RESEARCH_UBERTIP_RING_ABILITY(data)
</div></code></pre>
<ul>
<li>[B]const\unit.lua</li>
<li>[L]<strong>echo.lua</strong></li>
</ul>
<pre class="hljs"><code><div>echo(msg, whichPlayer, duration, x, y)
</div></code></pre>
<ul>
<li>[B]engine.lua</li>
<li>[L]<strong>foundation\Mapping.lua</strong></li>
</ul>
<pre class="hljs"><code><div>Mapping:new()
Mapping:length()
Mapping:set(key, value)
Mapping:get(key)
Mapping:del(...)
Mapping:forEach(action)
</div></code></pre>
<ul>
<li>[L]<strong>foundation\color.lua</strong></li>
</ul>
<pre class="hljs"><code><div>hcolor.hex(str, color)
hcolor.mixed(str, color)
hcolor.gold(str)
hcolor.white(str)
hcolor.black(str)
hcolor.grey(str)
hcolor.greyDeep(str)
hcolor.redLight(str)
hcolor.red(str)
hcolor.greenLight(str)
hcolor.green(str)
hcolor.yellowLight(str)
hcolor.yellow(str)
hcolor.orangeLight(str)
hcolor.orange(str)
hcolor.skyLight(str)
hcolor.sky(str)
hcolor.seaLight(str)
hcolor.sea(str)
hcolor.purpleLight(str)
hcolor.purple(str)
</div></code></pre>
<ul>
<li>[L]<strong>foundation\json.lua</strong></li>
</ul>
<pre class="hljs"><code><div>kind_of(obj)
escape_str(s)
skip_delim(str, pos, delim, err_if_missing)
parse_str_val(str, pos, val)
parse_num_val(str, pos)
json.stringify(obj, as_key)
json.parse(str, pos, end_delim)
</div></code></pre>
<ul>
<li>[L]<strong>foundation\math.lua</strong></li>
</ul>
<pre class="hljs"><code><div>math.random(n, m)
math.polarProjection(x, y, dist, angle)
math.round(decimal, n)
math.numberFormat(value, n)
math.integerFormat(value)
math.getDegBetweenXY(x1, y1, x2, y2)
math.getDegBetweenUnit(u1, u2)
math.getDistanceBetweenXY(x1, y1, x2, y2)
math.getDistanceBetweenUnit(u1, u2)
math.getMaxDistanceInRect(w, h, deg)
math.date(timestamp)
</div></code></pre>
<ul>
<li>[L]<strong>foundation\string.lua</strong></li>
</ul>
<pre class="hljs"><code><div>string.char2id(idChar)
string.id2char(id)
string.mb_len(inputStr)
string.vkey(t)
string.addslashes(s)
string.stripslashes(s)
string.base64Encode(source_str)
string.base64Decode(str64)
string.explode(delimeter, str)
string.implode(delimeter, table)
string.split(str, size)
string.mb_split(str, size)
string.strpos(str, pattern)
string.findCount(str, pattern)
string.attrBuffKey(val)
string.convert(dec, cvt)
</div></code></pre>
<ul>
<li>[L]<strong>foundation\table.lua</strong></li>
</ul>
<pre class="hljs"><code><div>table.len(table)
table.random(arr)
table.shuffle(arr)
table.clone(org)
copy(org1, res)
table.merge(...)
table.includes(arr, val)
table.delete(arr, val, qty)
table.value(arr, key)
table.obj2arr(obj, keyMap)
</div></code></pre>
<ul>
<li>[B]h-lua.lua</li>
<li>[L]<strong>lib\attribute\setter.lua</strong></li>
</ul>
<pre class="hljs"><code><div>hattributeSetter.getDecimalTemporaryStorage(whichUnit, attr)
hattributeSetter.setDecimalTemporaryStorage(whichUnit, attr, value)
hattributeSetter.relyRegister(whichUnit)
hattributeSetter.setUnitMaxLife(whichUnit, currentVal, futureVal, diff)
hattributeSetter.setUnitMaxMana(whichUnit, currentVal, futureVal, diff)
hattributeSetter.setUnitAttackWhite(whichUnit, futureVal, diff)
hattributeSetter.setUnitAttackGreen(whichUnit, futureVal)
hattributeSetter.setUnitAttackRange(whichUnit, futureVal)
hattributeSetter.setUnitAttackSpace(whichUnit, futureVal)
hattributeSetter.setUnitAttackSpeed(whichUnit, futureVal)
hattributeSetter.setUnitDefendWhite(whichUnit, futureVal)
hattributeSetter.setUnitDefendGreen(whichUnit, futureVal)
hattributeSetter.setUnitSight(whichUnit, futureVal)
hattributeSetter.setUnitThree(whichUnit, futureVal, attr, diff)
hattributeSetter.relation(whichUnit, attr, diff)
</div></code></pre>
<ul>
<li>[L]<strong>lib\attribute\xtras.lua</strong></li>
</ul>
<pre class="hljs"><code><div>hattribute.xtrasPassAlive(targetUnit, type, field)
hattribute.getXtras(whichUnit, eventKey)
hattribute.hasXtras(whichUnit, eventKey)
hattribute.xtras(triggerUnit, eventKey, evtData)
</div></code></pre>
<ul>
<li>[L]<strong>lib\attribute.lua</strong></li>
</ul>
<pre class="hljs"><code><div>hattribute.isValType(field, valType)
hattribute.setRelation(relation)
hattribute.init(whichUnit)
hattribute.setHandle(whichUnit, attr, opr, val, during)
hattribute.set(whichUnit, during, data)
hattribute.get(whichUnit, attr, default)
hattribute.caleAttribute(damageSrc, isAdd, whichUnit, attr, times)
hattribute.getArmorReducePercent(defend)
</div></code></pre>
<ul>
<li>[L]<strong>lib\award.lua</strong></li>
</ul>
<pre class="hljs"><code><div>haward.setShareRange(range)
haward.forUnit(whichUnit, exp, gold, lumber)
haward.forUnitExp(whichUnit, exp)
haward.forUnitGold(whichUnit, gold)
haward.forUnitLumber(whichUnit, lumber)
haward.forGroup(whichUnit, exp, gold, lumber)
haward.forGroupExp(whichUnit, exp)
haward.forGroupGold(whichUnit, gold)
haward.forGroupLumber(whichUnit, lumber)
haward.forPlayer(gold, lumber)
haward.forPlayerGold(gold)
haward.forPlayerLumber(lumber)
</div></code></pre>
<ul>
<li>[L]<strong>lib\buff.lua</strong></li>
</ul>
<pre class="hljs"><code><div>hbuff.uniqueKey()
hbuff.count(handleUnit, groupKey)
hbuff.create(during, handleUnit, groupKey, diff, purpose, rollback)
hbuff.purpose(handleUnit, buffKey)
hbuff.delete(handleUnit, buffKey)
</div></code></pre>
<ul>
<li>[L]<strong>lib\cache.lua</strong></li>
</ul>
<pre class="hljs"><code><div>hcache.len()
hcache.exist(handle, key)
hcache.alloc(handle)
hcache.protect(handle)
hcache.protected(handle)
hcache.free(handle, key)
hcache.set(handle, key, value)
hcache.get(handle, key, default)
</div></code></pre>
<ul>
<li>[L]<strong>lib\camera.lua</strong></li>
</ul>
<pre class="hljs"><code><div>hcamera.reset(whichPlayer, during)
hcamera.apply(whichPlayer, during, camerasetup)
hcamera.toXY(whichPlayer, during, x, y)
hcamera.toUnit(whichPlayer, during, whichUnit)
hcamera.lock(whichPlayer, whichUnit)
hcamera.changeDistance(whichPlayer, diffDistance)
hcamera.shock(whichPlayer, whichType, during, scale)
</div></code></pre>
<ul>
<li>[L]<strong>lib\cmd.lua</strong></li>
</ul>
<pre class="hljs"><code><div>hcmd.conf(commands, playerIndexes)
</div></code></pre>
<ul>
<li>[L]<strong>lib\dialog.lua</strong></li>
</ul>
<pre class="hljs"><code><div>hdialog.hotkey(key)
hdialog.del(whichDialog)
hdialog.create(whichPlayer, options, action)
</div></code></pre>
<ul>
<li>[B]lib\dzapi\cache.lua</li>
<li>[L]<strong>lib\dzapi.lua</strong></li>
</ul>
<pre class="hljs"><code><div>hdzapi.isRPGLobby()
hdzapi.isRPGLadder()
hdzapi.isRedVip(whichPlayer)
hdzapi.isBlueVip(whichPlayer)
hdzapi.isPlatformVIP(whichPlayer)
hdzapi.mapLevel(whichPlayer)
hdzapi.hasMallItem(whichPlayer, key)
hdzapi.timestamp()
hdzapi.date()
hdzapi.loadServer(whichPlayer, key)
hdzapi.loadServerBool(whichPlayer, key)
hdzapi.loadServerNumber(whichPlayer, key)
hdzapi.loadServerInteger(whichPlayer, key)
hdzapi.roulette(whichPlayer, method, params)
hdzapi.saveServer(whichPlayer, key, value)
hdzapi.clearServer(whichPlayer, key)
hdzapi.setRoomStat(whichPlayer, key, value)
</div></code></pre>
<ul>
<li>[B]lib\dzui\cache.lua</li>
<li>[L]<strong>lib\dzui.lua</strong></li>
</ul>
<pre class="hljs"><code><div>hdzui.wideScreen()
hdzui.hideInterface()
hdzui.loadToc(tocFilePath)
hdzui.frame(fdfName, parent, id)
hdzui.frameTag(fdfType, fdfName, parent, tag, id)
hdzui.framePoint(frameId, relation, align, alignRelation, x, y)
hdzui.onMouse(frameId, mouseOrder, callFunc)
hdzui.miniMapTrack(options)
</div></code></pre>
<ul>
<li>[L]<strong>lib\effect.lua</strong></li>
</ul>
<pre class="hljs"><code><div>heffect.del(e)
heffect.toXY(effectModel, x, y, during)
heffect.toUnit(effectModel, targetUnit, during)
heffect.bindUnit(effectModel, targetUnit, attach, during)
</div></code></pre>
<ul>
<li>[L]<strong>lib\enchant.lua</strong></li>
</ul>
<pre class="hljs"><code><div>henchant.setIntrinsicAddition(percent)
henchant.enableAppend(status)
henchant.setAppendAttachEffect(whichEnchant, effects)
henchant.setEnvReaction(onEnchant, toEnchant, reaction)
henchant.append(options)
</div></code></pre>
<ul>
<li>[L]<strong>lib\enemy.lua</strong></li>
</ul>
<pre class="hljs"><code><div>henemy.set(name, color, playerIndexes, isShareSight)
henemy.getPlayer(createQty, teamNo)
henemy.isShareSight(teamNo)
henemy.create(options)
</div></code></pre>
<ul>
<li>[L]<strong>lib\env.lua</strong></li>
</ul>
<pre class="hljs"><code><div>henv.setFogStatus(enableFog, enableMark)
henv.clearDestructable(whichRect)
henv.build(whichRect, typeStr, isInvulnerable, isDestroyRect, ground, doodad, units)
henv.random(whichRect, typeStr, isInvulnerable, isDestroyRect)
</div></code></pre>
<ul>
<li>[L]<strong>lib\event\defaultActions.lua</strong></li>
</ul>
<pre class="hljs"><code><div></div></code></pre>
<ul>
<li>[L]<strong>lib\event.lua</strong></li>
</ul>
<pre class="hljs"><code><div>hevent.free(handle)
hevent.pool(handle, conditionAction, regEvent)
hevent.setLastDamage(sourceUnit, targetUnit)
hevent.getUnitLastDamageSource(whichUnit)
hevent.getUnitLastDamageTarget(whichUnit)
hevent.getPlayerLastDamageTarget(whichPlayer)
hevent.registerEvent(handle, key, callFunc)
hevent.triggerData(triggerData)
hevent.hslk(key, triggerData)
hevent.triggerEvent(handle, key, triggerData)
hevent.deleteEvent(handle, key, eventId)
hevent.onAttackDetect(whichUnit, callFunc)
hevent.onAttackGetTarget(whichUnit, callFunc)
hevent.onBeAttackReady(whichUnit, callFunc)
hevent.onAttack(whichUnit, callFunc)
hevent.onBeAttack(whichUnit, callFunc)
hevent.onSkill(whichUnit, callFunc)
hevent.onBeSkill(whichUnit, callFunc)
hevent.onSkillStudy(whichUnit, callFunc)
hevent.onSkillReady(whichUnit, callFunc)
hevent.onSkillCast(whichUnit, callFunc)
hevent.onSkillStop(whichUnit, callFunc)
hevent.onSkillEffect(whichUnit, callFunc)
hevent.onSkillFinish(whichUnit, callFunc)
hevent.onItem(whichUnit, callFunc)
hevent.onBeItem(whichUnit, callFunc)
hevent.onItemUsed(whichUnit, callFunc)
hevent.onItemDrop(whichUnit, callFunc)
hevent.onItemGet(whichUnit, callFunc)
hevent.onItemPawn(whichUnit, callFunc)
hevent.onItemSell(whichUnit, callFunc)
hevent.onUnitSell(whichUnit, callFunc)
hevent.onItemDestroy(whichItem, callFunc)
hevent.onItemSeparate(whichItem, callFunc)
hevent.onItemSynthesis(whichUnit, callFunc)
hevent.onItemOverWeight(whichUnit, callFunc)
hevent.onItemOverSlot(whichUnit, callFunc)
hevent.onDamage(whichUnit, callFunc)
hevent.onBeDamage(whichUnit, callFunc)
hevent.onDamageResistance(whichUnit, callFunc)
hevent.onAvoid(whichUnit, callFunc)
hevent.onBeAvoid(whichUnit, callFunc)
hevent.onBreakArmor(whichUnit, callFunc)
hevent.onBeBreakArmor(whichUnit, callFunc)
hevent.onSwim(whichUnit, callFunc)
hevent.onBeSwim(whichUnit, callFunc)
hevent.onBroken(whichUnit, callFunc)
hevent.onBeBroken(whichUnit, callFunc)
hevent.onSilent(whichUnit, callFunc)
hevent.onBeSilent(whichUnit, callFunc)
hevent.onUnarm(whichUnit, callFunc)
hevent.onBeUnarm(whichUnit, callFunc)
hevent.onFetter(whichUnit, callFunc)
hevent.onBeFetter(whichUnit, callFunc)
hevent.onBomb(whichUnit, callFunc)
hevent.onBeBomb(whichUnit, callFunc)
hevent.onLightningChain(whichUnit, callFunc)
hevent.onBeLightningChain(whichUnit, callFunc)
hevent.onCrackFly(whichUnit, callFunc)
hevent.onBeCrackFly(whichUnit, callFunc)
hevent.onRebound(whichUnit, callFunc)
hevent.onBeRebound(whichUnit, callFunc)
hevent.onKnocking(whichUnit, callFunc)
hevent.onBeKnocking(whichUnit, callFunc)
hevent.onSplit(whichUnit, callFunc)
hevent.onBeSplit(whichUnit, callFunc)
hevent.onHemophagia(whichUnit, callFunc)
hevent.onBeHemophagia(whichUnit, callFunc)
hevent.onSkillHemophagia(whichUnit, callFunc)
hevent.onBeSkillHemophagia(whichUnit, callFunc)
hevent.onSiphon(whichUnit, callFunc)
hevent.onBeSiphon(whichUnit, callFunc)
hevent.onSkillSiphon(whichUnit, callFunc)
hevent.onBeSkillSiphon(whichUnit, callFunc)
hevent.onPunish(whichUnit, callFunc)
hevent.onDead(whichUnit, callFunc)
hevent.onKill(whichUnit, callFunc)
hevent.onReborn(whichUnit, callFunc)
hevent.onExp(whichUnit, callFunc)
hevent.onLevelUp(whichUnit, callFunc)
hevent.onUpgradeStart(whichUnit, callFunc)
hevent.onUpgradeCancel(whichUnit, callFunc)
hevent.onUpgradeFinish(whichUnit, callFunc)
hevent.onEnterUnitRange(whichUnit, radius, callFunc)
hevent.onEnterRect(whichRect, callFunc)
hevent.onLeaveRect(whichRect, callFunc)
hevent.onConstructStart(whichPlayer, callFunc)
hevent.onConstructCancel(whichPlayer, callFunc)
hevent.onConstructFinish(whichPlayer, callFunc)
hevent.onChat(whichPlayer, pattern, callFunc)
hevent.onEsc(whichPlayer, callFunc)
hevent.onSelection(whichPlayer, qty, callFunc)
hevent.onDeSelection(whichPlayer, callFunc)
hevent.onPlayerLeave(callFunc)
hevent.onPlayerResourceChange(callFunc)
hevent.onPickHero(callFunc)
hevent.onDestructableDestroy(whichDestructable, callFunc)
hevent.onMapDestructableDestroy(callFunc)
hevent.onCourierBlink(whichUnit, callFunc)
hevent.onCourierRangePickUp(whichUnit, callFunc)
hevent.onCourierSeparate(whichUnit, callFunc)
hevent.onCourierDeliver(whichUnit, callFunc)
hevent.onMoveStart(whichUnit, callFunc)
hevent.onMoving(whichUnit, callFunc)
hevent.onMoveStop(whichUnit, callFunc)
hevent.onHoldOn(whichUnit, callFunc)
hevent.onStop(whichUnit, callFunc)
</div></code></pre>
<ul>
<li>[L]<strong>lib\group.lua</strong></li>
</ul>
<pre class="hljs"><code><div>hgroup.forEach(whichGroup, action)
hgroup.count(whichGroup)
hgroup.includes(whichGroup, whichUnit)
hgroup.isEmpty(whichGroup)
hgroup.addUnit(whichGroup, whichUnit)
hgroup.removeUnit(whichGroup, whichUnit)
hgroup.createByXY(x, y, radius, filterFunc)
hgroup.createByUnit(u, radius, filterFunc)
hgroup.createByRect(r, filterFunc)
hgroup.getClosest(whichGroup, x, y)
hgroup.portal(whichGroup, x, y, eff, isFollow)
hgroup.animate(whichGroup, animate)
hgroup.clear(whichGroup, isDestroy, isDestroyUnit)
</div></code></pre>
<ul>
<li>[L]<strong>lib\hero.lua</strong></li>
</ul>
<pre class="hljs"><code><div>hhero.getPrimary(whichHero)
hhero.getPrimaryLabel(whichHero)
hhero.getStrPlus(whichHero)
hhero.getAgiPlus(whichHero)
hhero.getIntPlus(whichHero)
hhero.getProperName(whichHero)
hhero.setPrevLevel(whichHero, lv)
hhero.getPrevLevel(whichHero)
hhero.getCurLevel(whichHero)
hhero.setCurLevel(whichHero, newLevel, showEffect)
hhero.getExp(whichHero)
hhero.getExpNeed(targetLevel)
hhero.getSkillPoints(whichHero)
hhero.setPlayerAllowQty(whichPlayer, max)
hhero.getPlayerAllowQty(whichPlayer)
hhero.setBornXY(x, y)
hhero.reborn(whichHero, delay, invulnerable, x, y, showDialog)
hhero.buildSelector(options)
</div></code></pre>
<ul>
<li>[L]<strong>lib\id.lua</strong></li>
</ul>
<pre class="hljs"><code><div>HL_ID_INIT()
</div></code></pre>
<ul>
<li>[L]<strong>lib\initialization.lua</strong></li>
</ul>
<pre class="hljs"><code><div></div></code></pre>
<ul>
<li>[L]<strong>lib\is.lua</strong></li>
</ul>
<pre class="hljs"><code><div>his.night()
his.day()
his.computer(whichPlayer)
his.playerSite(whichPlayer)
his.playing(whichPlayer)
his.neutral(whichPlayer)
his.detected(whichUnit, whichPlayer)
his.hasSlot(whichUnit, slotId)
his.canAttack(whichUnit)
his.dead(whichUnit)
his.alive(whichUnit)
his.deleted(whichUnit)
his.invincible(whichUnit)
his.invisible(whichUnit)
his.hero(whichUnit)
his.courier(whichUnit)
his.structure(whichUnit)
his.illusion(whichUnit)
his.ground(whichUnit)
his.air(whichUnit)
his.melee(whichUnit)
his.ranged(whichUnit)
his.summoned(whichUnit)
his.mechanical(whichUnit)
his.ancient(whichUnit)
his.sapper(whichUnit)
his.ethereal(whichUnit)
his.immune(whichUnit)
his.race(whichUnit, whichRace)
his.locust(whichUnit)
his.swim(whichUnit)
his.enablePunish(whichUnit)
his.punish(whichUnit)
his.silent(whichUnit)
his.unarm(whichUnit)
his.crackFly(whichUnit)
his.beDamaging(whichUnit)
his.damaging(whichUnit)
his.playerBeDamaging(whichPlayer)
his.playerDamaging(whichPlayer)
his.water(whichUnit)
his.floor(whichUnit)
his.unit(whichUnit, otherUnit)
his.enemy(whichUnit, otherUnit)
his.ally(whichUnit, otherUnit)
his.parallel(u1, u2, maxDistance, forcedOrder)
his.intersect(u1, u2, maxDistance, face2face)
his.enemyPlayer(whichUnit, whichPlayer)
his.allyPlayer(whichUnit, whichPlayer)
his.marking(whichPlayer)
his.inRect(whichRect, x, y)
his.borderRect(whichRect, x, y)
his.borderMap(x, y)
his.borderCamera(x, y)
his.destroy(whichItem)
his.hasItem(whichUnit, whichItemId)
</div></code></pre>
<ul>
<li>[L]<strong>lib\item.lua</strong></li>
</ul>
<pre class="hljs"><code><div>hitem.x(it)
hitem.y(it)
hitem.z(it)
hitem.embed(u)
hitem.free(whichItem)
hitem.setHolder(whichItem, holder)
hitem.getHolder(whichItem)
hitem.setLastHolder(whichItem, holder)
hitem.getLastHolder(whichItem)
hitem.backToLastHolder(whichItem)
hitem.isRobber(whichItem, robber)
hitem.used(whichUnit, whichItem, triggerData)
hitem.del(it, delay)
hitem.delFromUnit(whichUnit)
hitem.getId(itOrId)
hitem.getName(itOrId)
hitem.isShadowFront(itOrId)
hitem.isShadowBack(itOrId)
hitem.shadowID(itOrId)
hitem.getArt(itOrId)
hitem.getFile(itOrId)
hitem.getClass(itOrId)
hitem.getGoldCost(itOrId)
hitem.getLumberCost(itOrId)
hitem.getIsUsable(itOrId)
hitem.getIsPowerUp(itOrId)
hitem.getIsPerishable(itOrId)
hitem.getIsSellAble(itOrId)
hitem.getOverlie(itOrId)
hitem.getWeight(itOrId, charges)
hitem.getAttribute(itOrId)
hitem.getLevel(it)
hitem.getCharges(it)
hitem.setCharges(it, charges)
hitem.getTotalCharges(itemId, whichUnit)
hitem.getEmptySlot(whichUnit)
hitem.forEach(whichUnit, action)
hitem.addProperty(whichUnit, itId, charges)
hitem.subProperty(whichUnit, itId, charges)
hitem.overlyingSlot(itemSlot)
hitem.synthesis(whichUnit, items)
hitem.separate(whichItem, separateType, formulaIndex, whichUnit)
hitem.create(options)
hitem.fleeting(fleetingType, x, y, during, yourFunc)
hitem.give(origin, target)
hitem.pick(it, targetUnit)
hitem.copy(origin, target)
hitem.drop(origin, slot)
hitem.pickRect(u, x, y, w, h)
hitem.pickRound(u, x, y, r)
</div></code></pre>
<ul>
<li>[L]<strong>lib\itemPool.lua</strong></li>
</ul>
<pre class="hljs"><code><div>hitemPool.poolName(poolName)
hitemPool.insert(poolName, whichItem)
hitemPool.delete(poolName, whichItem)
hitemPool.free(whichItem)
hitemPool.forEach(poolName, action)
</div></code></pre>
<ul>
<li>[L]<strong>lib\japi\formatter.lua</strong></li>
</ul>
<pre class="hljs"><code><div>local toBool(value)
local toInt(value, def)
</div></code></pre>
<ul>
<li>[L]<strong>lib\japi\triumph.lua</strong></li>
</ul>
<pre class="hljs"><code><div></div></code></pre>
<ul>
<li>[L]<strong>lib\japi.lua</strong></li>
</ul>
<pre class="hljs"><code><div>hjapi.echo(msg)
hjapi.has(method)
hjapi.formatter(method, params)
hjapi.triumph(method, params, result)
hjapi.exec(method, params)
does not exist, please check the WE environment! You should make friends with 5382557(QQ)&quot;)
hjapi.DzAPI_CommonFunc_GetARGBColorValue(...)
hjapi.DzAPI_CommonFunc_GetARGBColorValuePercent(...)
hjapi.DzAPI_CommonFunc_SetARGBColorValue(...)
hjapi.DzAPI_CommonFunc_SetARGBColorValuePercent(...)
hjapi.DzAPI_Map_ChangeStoreItemCoolDown(...)
hjapi.DzAPI_Map_ChangeStoreItemCount(...)
hjapi.DzAPI_Map_GetActivityData()
hjapi.DzAPI_Map_GetGameStartTime()
hjapi.DzAPI_Map_GetGuildName(whichPlayer)
hjapi.DzAPI_Map_GetGuildRole(whichPlayer)
hjapi.DzAPI_Map_GetLadderLevel(whichPlayer)
hjapi.DzAPI_Map_GetLadderRank(whichPlayer)
hjapi.DzAPI_Map_GetMapConfig(key)
hjapi.DzAPI_Map_GetMapLevel(whichPlayer)
hjapi.DzAPI_Map_GetMapLevelRank(whichPlayer)
hjapi.DzAPI_Map_GetMatchType()
hjapi.DzAPI_Map_GetPlatformVIP(whichPlayer)
hjapi.DzAPI_Map_IsPlatformVIP(whichPlayer)
hjapi.DzAPI_Map_GetPublicArchive(whichPlayer, key)
hjapi.DzAPI_Map_GetServerArchiveDrop(whichPlayer, key)
hjapi.DzAPI_Map_GetServerArchiveEquip(whichPlayer, key)
hjapi.DzAPI_Map_GetServerValue(whichPlayer, key)
hjapi.DzAPI_Map_GetServerValueErrorCode(whichPlayer)
hjapi.GetPlayerServerValueSuccess(whichPlayer)
hjapi.DzAPI_Map_GetUserID(...)
hjapi.DzAPI_Map_HasMallItem(whichPlayer, key)
hjapi.DzAPI_Map_IsBlueVIP(whichPlayer)
hjapi.DzAPI_Map_IsRPGLadder()
hjapi.DzAPI_Map_IsRPGLobby()
hjapi.DzAPI_Map_IsRedVIP(whichPlayer)
hjapi.DzAPI_Map_Ladder_SetPlayerStat(whichPlayer, key, value)
hjapi.DzAPI_Map_Ladder_SubmitPlayerRank(whichPlayer, value)
hjapi.DzAPI_Map_Ladder_SetStat(whichPlayer, key, value)
hjapi.DzAPI_Map_Ladder_SubmitTitle(whichPlayer, value)
hjapi.DzAPI_Map_Ladder_SubmitPlayerExtraExp(whichPlayer, value)
hjapi.DzAPI_Map_MissionComplete(whichPlayer, key, value)
hjapi.DzAPI_Map_OrpgTrigger(whichPlayer, key)
hjapi.DzAPI_Map_SavePublicArchive(whichPlayer, key, value)
hjapi.DzAPI_Map_SaveServerValue(whichPlayer, key, value)
hjapi.DzAPI_Map_Stat_SetStat(whichPlayer, key, value)
hjapi.DzAPI_Map_Statistics(whichPlayer, eventKey, eventType, value)
hjapi.DzAPI_Map_ToggleStore(...)
hjapi.DzAPI_Map_UpdatePlayerHero(...)
hjapi.DzAPI_Map_UseConsumablesItem(whichPlayer, key)
hjapi.DzAPI_UnitType_CountUnitTypeDataArrayAbilID(...)
hjapi.DzAPI_UnitType_CountUnitTypeDataArrayBoolean(...)
hjapi.DzAPI_UnitType_CountUnitTypeDataArrayItemID(...)
hjapi.DzAPI_UnitType_CountUnitTypeDataArrayReal(...)
hjapi.DzAPI_UnitType_CountUnitTypeDataArrayString(...)
hjapi.DzAPI_UnitType_CountUnitTypeDataArrayTechID(...)
hjapi.DzAPI_UnitType_CountUnitTypeDataArrayUnitID(...)
hjapi.DzAPI_UnitType_CountUnitTypeDataRequires(...)
hjapi.DzAPI_UnitType_CountUnitTypeDataRequiresamount(...)
hjapi.DzAPI_UnitType_GetEnum_PreventOrReguirePlace(...)
hjapi.DzAPI_UnitType_GetEnum_PreventOrReguirePlaceCheck(...)
hjapi.DzAPI_UnitType_GetEnum_Primary(...)
hjapi.DzAPI_UnitType_GetEnum_TargetTypeCheck(...)
hjapi.DzAPI_UnitType_GetEnum_TargetTypeSeries(...)
hjapi.DzAPI_UnitType_GetEnum_armor(...)
hjapi.DzAPI_UnitType_GetEnum_atkType(...)
hjapi.DzAPI_UnitType_GetEnum_buffType(...)
hjapi.DzAPI_UnitType_GetEnum_deathType(...)
hjapi.DzAPI_UnitType_GetEnum_defType(...)
hjapi.DzAPI_UnitType_GetEnum_movetp(...)
hjapi.DzAPI_UnitType_GetEnum_race(...)
hjapi.DzAPI_UnitType_GetEnum_regenType(...)
hjapi.DzAPI_UnitType_GetEnum_type(...)
hjapi.DzAPI_UnitType_GetEnum_typeCheck(...)
hjapi.DzAPI_UnitType_GetEnum_warpsOn(...)
hjapi.DzAPI_UnitType_GetEnum_weapTp(...)
hjapi.DzAPI_UnitType_GetEnum_weapType(...)
hjapi.DzAPI_UnitType_GetUnitTypeDataAbilID(...)
hjapi.DzAPI_UnitType_GetUnitTypeDataArrayAbilID(...)
hjapi.DzAPI_UnitType_GetUnitTypeDataArrayBoolean(...)
hjapi.DzAPI_UnitType_GetUnitTypeDataArrayItemID(...)
hjapi.DzAPI_UnitType_GetUnitTypeDataArrayReal(...)
hjapi.DzAPI_UnitType_GetUnitTypeDataArrayString(...)
hjapi.DzAPI_UnitType_GetUnitTypeDataArrayTechID(...)
hjapi.DzAPI_UnitType_GetUnitTypeDataArrayUnitID(...)
hjapi.DzAPI_UnitType_GetUnitTypeDataBoolean(...)
hjapi.DzAPI_UnitType_GetUnitTypeDataInt(...)
hjapi.DzAPI_UnitType_GetUnitTypeDataReal(...)
hjapi.DzAPI_UnitType_GetUnitTypeDataRequires(...)
hjapi.DzAPI_UnitType_GetUnitTypeDataRequiresamount(...)
hjapi.DzAPI_UnitType_GetUnitTypeDataString(...)
hjapi.DzAPI_UnitType_GettUnitTypeDataRequirescount(...)
hjapi.DzAPI_UnitType_ResizeUnitTypeDataArrayAbilID(...)
hjapi.DzAPI_UnitType_ResizeUnitTypeDataArrayBoolean(...)
hjapi.DzAPI_UnitType_ResizeUnitTypeDataArrayItemID(...)
hjapi.DzAPI_UnitType_ResizeUnitTypeDataArrayReal(...)
hjapi.DzAPI_UnitType_ResizeUnitTypeDataArrayString(...)
hjapi.DzAPI_UnitType_ResizeUnitTypeDataArrayTechID(...)
hjapi.DzAPI_UnitType_ResizeUnitTypeDataArrayUnitID(...)
hjapi.DzAPI_UnitType_ResizeUnitTypeDataRequires(...)
hjapi.DzAPI_UnitType_ResizeUnitTypeDataRequiresamount(...)
hjapi.DzAPI_UnitType_SetEnum_PreventOrReguirePlace(...)
hjapi.DzAPI_UnitType_SetEnum_PreventOrReguirePlaceModify(...)
hjapi.DzAPI_UnitType_SetEnum_Primary(...)
hjapi.DzAPI_UnitType_SetEnum_TargetTypeModify(...)
hjapi.DzAPI_UnitType_SetEnum_TargetTypeSeries(...)
hjapi.DzAPI_UnitType_SetEnum_armor(...)
hjapi.DzAPI_UnitType_SetEnum_atkType(...)
hjapi.DzAPI_UnitType_SetEnum_buffType(...)
hjapi.DzAPI_UnitType_SetEnum_deathType(...)
hjapi.DzAPI_UnitType_SetEnum_defType(...)
hjapi.DzAPI_UnitType_SetEnum_movetp(...)
hjapi.DzAPI_UnitType_SetEnum_race(...)
hjapi.DzAPI_UnitType_SetEnum_regenType(...)
hjapi.DzAPI_UnitType_SetEnum_type(...)
hjapi.DzAPI_UnitType_SetEnum_typeModify(...)
hjapi.DzAPI_UnitType_SetEnum_warpsOn(...)
hjapi.DzAPI_UnitType_SetEnum_weapTp(...)
hjapi.DzAPI_UnitType_SetEnum_weapType(...)
hjapi.DzAPI_UnitType_SetUnitTypeDataAbilID(...)
hjapi.DzAPI_UnitType_SetUnitTypeDataArrayAbilID(...)
hjapi.DzAPI_UnitType_SetUnitTypeDataArrayBoolean(...)
hjapi.DzAPI_UnitType_SetUnitTypeDataArrayItemID(...)
hjapi.DzAPI_UnitType_SetUnitTypeDataArrayReal(...)
hjapi.DzAPI_UnitType_SetUnitTypeDataArrayString(...)
hjapi.DzAPI_UnitType_SetUnitTypeDataArrayTechID(...)
hjapi.DzAPI_UnitType_SetUnitTypeDataArrayUnitID(...)
hjapi.DzAPI_UnitType_SetUnitTypeDataBoolean(...)
hjapi.DzAPI_UnitType_SetUnitTypeDataInt(...)
hjapi.DzAPI_UnitType_SetUnitTypeDataReal(...)
hjapi.DzAPI_UnitType_SetUnitTypeDataRequires(...)
hjapi.DzAPI_UnitType_SetUnitTypeDataRequiresamount(...)
hjapi.DzAPI_UnitType_SetUnitTypeDataString(...)
hjapi.DzAPI_UnitstateToInteger(...)
hjapi.DzClickFrame(frameId)
hjapi.DzConvertWorldPosition(...)
hjapi.DzCreateFrame(frame, parent, id)
hjapi.DzCreateFrameByTagName(frameType, name, parent, template, id)
hjapi.DzCreateSimpleFrame(frame, parent, id)
hjapi.DzDebugString(...)
hjapi.DzDestroyFrame(frameId)
hjapi.DzDestructablePosition(d, x, y)
hjapi.DzDotaInfo_IsPlayerRandom(...)
hjapi.DzDotaInfo_IsRepicked(...)
hjapi.DzDotaInfo_Item(...)
hjapi.DzDotaInfo_Item_HE(...)
hjapi.DzDotaInfo_Item_TM(...)
hjapi.DzEnableWideScreen(enable)
hjapi.DzEvent_Building_Cancel(...)
hjapi.DzEvent_Building_Dead(...)
hjapi.DzEvent_Building_Finish(...)
hjapi.DzEvent_Building_Start(...)
hjapi.DzEvent_Hero_Dead(...)
hjapi.DzEvent_Hero_Level(...)
hjapi.DzEvent_Item_Drop(...)
hjapi.DzEvent_Item_Pickup(...)
hjapi.DzEvent_Item_Sell(...)
hjapi.DzEvent_Item_Use(...)
hjapi.DzEvent_Tech_Cancel(...)
hjapi.DzEvent_Tech_Finish(...)
hjapi.DzEvent_Tech_Start(...)
hjapi.DzEvent_Unit_Cancel(...)
hjapi.DzEvent_Unit_ChangeOwner(...)
hjapi.DzEvent_Unit_Dead(...)
hjapi.DzEvent_Unit_Finish(...)
hjapi.DzEvent_Unit_Hired(...)
hjapi.DzEvent_Unit_Start(...)
hjapi.DzExecuteFunc(funcName)
hjapi.DzFrameCageMouse(frame, enable)
hjapi.DzFrameClearAllPoints(frame)
hjapi.DzFrameEditBlackBorders(upperHeight, bottomHeight)
hjapi.DzFrameFindByName(name, id)
hjapi.DzFrameGetAlpha(frame)
hjapi.DzFrameGetChatMessage()
hjapi.DzFrameGetCommandBarButton(row, column)
hjapi.DzFrameGetEnable(frame)
hjapi.DzFrameGetHeight(frame)
hjapi.DzFrameGetHeroBarButton(buttonId)
hjapi.DzFrameGetHeroHPBar(buttonId)
hjapi.DzFrameGetHeroManaBar(buttonId)
hjapi.DzFrameGetItemBarButton(buttonId)
hjapi.DzFrameGetMinimap()
hjapi.DzFrameGetMinimapButton(buttonId)
hjapi.DzFrameGetName(frame)
hjapi.DzFrameGetParent(frame)
hjapi.DzFrameGetPortrait()
hjapi.DzFrameGetText(frame)
hjapi.DzFrameGetTextSizeLimit(frame)
hjapi.DzFrameGetTooltip()
hjapi.DzFrameGetTopMessage()
hjapi.DzFrameGetUnitMessage()
hjapi.DzFrameGetUpperButtonBarButton(buttonId)
hjapi.DzFrameGetValue(frame)
hjapi.DzFrameHideInterface()
hjapi.DzFrameSetAbsolutePoint(frame, point, x, y)
hjapi.DzFrameSetAllPoints(frame, relativeFrame)
hjapi.DzFrameSetAlpha(frame, alpha)
hjapi.DzFrameSetAnimate(frame, animId, autoCast)
hjapi.DzFrameSetAnimateOffset(frame, offset)
hjapi.DzFrameSetEnable(frame, enable)
hjapi.DzFrameSetFocus(frame, enable)
hjapi.DzFrameSetFont(frame, fileName, height, flag)
hjapi.DzFrameSetMinMaxValue(frame, minValue, maxValue)
hjapi.DzFrameSetModel(frame, modelFile, modelType, flag)
hjapi.DzFrameSetParent(frame, parent)
hjapi.DzFrameSetPoint(frame, point, relativeFrame, relativePoint, x, y)
hjapi.DzFrameSetPriority(frame, priority)
hjapi.DzFrameSetScale(frame, scale)
hjapi.DzFrameSetScript(frame, eventId, funcName, sync)
hjapi.DzFrameSetScriptByCode(frame, eventId, funcHandle, sync)
hjapi.DzFrameSetSize(frame, w, h)
hjapi.DzFrameSetStepValue(frame, step)
hjapi.DzFrameSetText(frame, text)
hjapi.DzFrameSetTextAlignment(frame, align)
hjapi.DzFrameSetTextColor(frame, color)
hjapi.DzFrameSetTextSizeLimit(frame, limit)
hjapi.DzFrameSetTexture(frame, texture, flag)
hjapi.DzFrameSetTooltip(frame, tooltip)
hjapi.DzFrameSetUpdateCallback(funcName)
hjapi.DzFrameSetUpdateCallbackByCode(funcHandle)
hjapi.DzFrameSetValue(frame, value)
hjapi.DzFrameSetVertexColor(frame, vertexColor)
hjapi.DzFrameShow(frame, enable)
hjapi.DzGetClientHeight(...)
hjapi.DzGetClientWidth(...)
hjapi.DzGetColor(r, g, b, a)
hjapi.DzGetConvertWorldPositionX(...)
hjapi.DzGetConvertWorldPositionY(...)
hjapi.DzGetGameMode(...)
hjapi.DzGetGameUI()
hjapi.DzGetLocale()
hjapi.DzGetMouseFocus()
hjapi.DzGetMouseTerrainX()
hjapi.DzGetMouseTerrainY()
hjapi.DzGetMouseTerrainZ()
hjapi.DzGetMouseX()
hjapi.DzGetMouseXRelative()
hjapi.DzGetMouseY()
hjapi.DzGetMouseYRelative()
hjapi.DzGetPlayerInitGold(...)
hjapi.DzGetPlayerName(...)
hjapi.DzGetPlayerSelectedHero(...)
hjapi.DzGetTriggerKey()
hjapi.DzGetTriggerKeyPlayer()
hjapi.DzGetTriggerSyncData()
hjapi.DzGetTriggerSyncPlayer()
hjapi.DzGetTriggerUIEventFrame()
hjapi.DzGetTriggerUIEventPlayer()
hjapi.DzGetUnitNeededXP(whichUnit, level)
hjapi.DzGetUnitUnderMouse()
hjapi.DzGetWheelDelta()
hjapi.DzGetWindowHeight()
hjapi.DzGetWindowWidth()
hjapi.DzGetWindowX()
hjapi.DzGetWindowY()
hjapi.DzIsKeyDown(iKey)
hjapi.DzIsMouseOverUI()
hjapi.DzIsWindowActive()
hjapi.DzLoadToc(tocFilePath)
hjapi.DzOriginalUIAutoResetPoint(enable)
hjapi.DzPlatform_GameStart(...)
hjapi.DzPlatform_HasGameOver(...)
hjapi.DzPlatform_HasGameOver_Player(...)
hjapi.DzSetCustomFovFix(value)
hjapi.DzSetMemory(address, value)
hjapi.DzSetMousePos(x, y)
hjapi.DzSetParams(...)
hjapi.DzSetUnitID(whichUnit, id)
hjapi.DzSetUnitModel(whichUnit, model)
hjapi.DzSetUnitPosition(whichUnit, x, y)
hjapi.DzSetUnitTexture(whichUnit, path, texId)
hjapi.DzSetWar3MapMap(blp)
hjapi.DzSimpleFontStringFindByName(name, id)
hjapi.DzSimpleFrameFindByName(name, id)
hjapi.DzSimpleTextureFindByName(name, id)
hjapi.DzSyncBuffer(...)
hjapi.DzSyncData(prefix, data)
hjapi.DzTriggerRegisterKeyEvent(trig, key, status, sync, funcName)
hjapi.DzTriggerRegisterKeyEventByCode(trig, key, status, sync, funcHandle)
hjapi.DzTriggerRegisterMouseEvent(trig, btn, status, sync, funcName)
hjapi.DzTriggerRegisterMouseEventByCode(trig, btn, status, sync, funcHandle)
hjapi.DzTriggerRegisterMouseMoveEvent(trig, sync, funcName)
hjapi.DzTriggerRegisterMouseMoveEventByCode(trig, sync, funcHandle)
hjapi.DzTriggerRegisterMouseWheelEvent(trig, sync, funcName)
hjapi.DzTriggerRegisterMouseWheelEventByCode(trig, sync, funcHandle)
hjapi.DzTriggerRegisterSyncData(trig, prefix, server)
hjapi.DzTriggerRegisterWindowResizeEvent(trig, sync, funcName)
hjapi.DzTriggerRegisterWindowResizeEventByCode(trig, sync, funcHandle)
hjapi.DzUnitDisableAttack(...)
hjapi.DzUnitDisableInventory(...)
hjapi.DzUnitLearningSkill(...)
hjapi.DzUnitSilence(...)
hjapi.EXBlendButtonIcon(...)
hjapi.EXDclareButtonIcon(...)
hjapi.EXDisplayChat(...)
hjapi.EXEffectMatReset(effect)
hjapi.EXEffectMatRotateX(effect, angle)
hjapi.EXEffectMatRotateY(effect, angle)
hjapi.EXEffectMatRotateZ(effect, angle)
hjapi.EXEffectMatScale(effect, x, y, z)
hjapi.EXExecuteScript(script)
hjapi.EXGetAbilityDataInteger(abil, level, dataType)
hjapi.EXGetAbilityDataReal(abil, level, dataType)
hjapi.EXGetAbilityDataString(abil, level, dataType)
hjapi.EXGetAbilityId(abil)
hjapi.EXGetAbilityState(abil, stateType)
hjapi.EXGetAbilityString(...)
hjapi.EXGetBuffDataString(buffCode, dataType)
hjapi.EXGetEffectSize(effect)
hjapi.EXGetEffectX(effect)
hjapi.EXGetEffectY(effect)
hjapi.EXGetEffectZ(effect)
hjapi.EXGetEventDamageData(eddType)
hjapi.isEventPhysicalDamage()
hjapi.isEventAttackDamage()
hjapi.isEventRangedDamage()
hjapi.isEventDamageType(damageType)
hjapi.isEventWeaponType(weaponType)
hjapi.isEventAttackType(attackType)
hjapi.EXGetItemDataString(itemCode, dataType)
hjapi.EXGetUnitAbility(whichUnit, abilityID)
hjapi.EXGetUnitAbilityByIndex(whichUnit, index)
hjapi.EXGetUnitArrayString(...)
hjapi.EXGetUnitInteger(...)
hjapi.EXGetUnitReal(...)
hjapi.EXGetUnitString(...)
hjapi.EXPauseUnit(whichUnit, enable)
hjapi.UnitAddSwim(whichUnit)
hjapi.UnitRemoveSwim(whichUnit)
hjapi.EXSetAbilityAEmeDataA(...)
hjapi.EXSetAbilityDataInteger(...)
hjapi.EXSetAbilityDataReal(...)
hjapi.EXSetAbilityDataString(...)
hjapi.EXSetAbilityState(ability, stateType, value)
hjapi.EXSetAbilityString(...)
hjapi.EXSetBuffDataString(buffCode, dataType, value)
hjapi.EXSetEffectSize(e, size)
hjapi.EXSetEffectSpeed(e, speed)
hjapi.EXSetEffectXY(e, x, y)
hjapi.EXSetEffectZ(e, z)
hjapi.EXSetEventDamage(amount)
hjapi.EXSetItemDataString(itemCode, dataType, value)
hjapi.EXSetUnitArrayString(...)
hjapi.EXSetUnitCollisionType(enable, u, t)
hjapi.EXSetUnitFacing(u, angle)
hjapi.EXSetUnitInteger(...)
hjapi.EXSetUnitMoveType(u, t)
hjapi.EXSetUnitReal(...)
hjapi.EXSetUnitString(...)
hjapi.GetEventDamage()
hjapi.GetUnitState(whichUnit, state)
hjapi.RequestExtraBooleanData(dataType, whichPlayer, param1, param2, param3, param4, param5, param6)
hjapi.RequestExtraIntegerData(dataType, whichPlayer, param1, param2, param3, param4, param5, param6)
hjapi.RequestExtraRealData(dataType, whichPlayer, param1, param2, param3, param4, param5, param6)
hjapi.RequestExtraStringData(dataType, whichPlayer, param1, param2, param3, param4, param5, param6)
hjapi.SetUnitState(whichUnit, state, value)
</div></code></pre>
<ul>
<li>[L]<strong>lib\leaderBoard.lua</strong></li>
</ul>
<pre class="hljs"><code><div>hleaderBoard.LeaderboardResize(whichLeaderBoard)
hleaderBoard.create(key, title, refreshFrequency, response)
hleaderBoard.show(key)
hleaderBoard.hide()
hleaderBoard.setTitle(key, title)
hleaderBoard.pos(key, n)
hleaderBoard.top(key)
hleaderBoard.bottom(key)
</div></code></pre>
<ul>
<li>[L]<strong>lib\lightning.lua</strong></li>
</ul>
<pre class="hljs"><code><div>hlightning.del(lightning, delay)
hlightning.xyz2xyz(lightningType, x1, y1, z1, x2, y2, z2, during)
hlightning.loc2loc(lightningType, loc1, loc2, during)
hlightning.unit2unit(lightningType, unit1, unit2, during)
</div></code></pre>
<ul>
<li>[L]<strong>lib\monitor.lua</strong></li>
</ul>
<pre class="hljs"><code><div>hmonitor.create(key, frequency, action, ignoreFilter)
hmonitor.destroy(key)
hmonitor.isListening(key, obj)
hmonitor.listen(key, obj)
hmonitor.ignore(key, obj)
</div></code></pre>
<ul>
<li>[L]<strong>lib\multiBoard.lua</strong></li>
</ul>
<pre class="hljs"><code><div>hmultiBoard.create(key, refreshFrequency, yourData)
hmultiBoard.setTitle(whichBoard, title)
</div></code></pre>
<ul>
<li>[L]<strong>lib\player.lua</strong></li>
</ul>
<pre class="hljs"><code><div>hplayer.adjustPlayerState(delta, whichPlayer, whichPlayerState)
hplayer.setPlayerState(whichPlayer, whichPlayerState, value)
hplayer.forEach(action)
hplayer.index(whichPlayer)
hplayer.loc()
hplayer.setConvertRatio(ratio)
hplayer.getConvertRatio()
hplayer.getName(whichPlayer)
hplayer.setName(whichPlayer, name)
hplayer.getSelection(whichPlayer)
hplayer.getStatus(whichPlayer)
hplayer.setStatus(whichPlayer, status)
hplayer.getPrestige(whichPlayer)
hplayer.setPrestige(whichPlayer, prestige)
hplayer.getApm(whichPlayer)
hplayer.setIsolated(whichPlayer, isIsolated)
hplayer.isIsolated(whichPlayer)
hplayer.getRandomHero()
hplayer.hideUnit(whichPlayer)
hplayer.clearUnit(whichPlayer)
hplayer.defeat(whichPlayer, tips)
hplayer.victory(whichPlayer, tips)
hplayer.setIsAutoConvert(whichPlayer, b)
hplayer.getIsAutoConvert(whichPlayer)
hplayer.setIsShocking(whichPlayer, b)
hplayer.getIsShocking(whichPlayer)
hplayer.getDamage(whichPlayer)
hplayer.addDamage(whichPlayer, val)
hplayer.getBeDamage(whichPlayer)
hplayer.addBeDamage(whichPlayer, val)
hplayer.getKill(whichPlayer)
hplayer.addKill(whichPlayer, val)
hplayer.diffGoldRatio(whichPlayer, diff, during)
hplayer.setGoldRatio(whichPlayer, val, during)
hplayer.addGoldRatio(whichPlayer, val, during)
hplayer.subGoldRatio(whichPlayer, val, during)
hplayer.getGoldRatio(whichPlayer)
hplayer.diffLumberRatio(whichPlayer, diff, during)
hplayer.setLumberRatio(whichPlayer, val, during)
hplayer.addLumberRatio(whichPlayer, val, during)
hplayer.subLumberRatio(whichPlayer, val, during)
hplayer.getLumberRatio(whichPlayer)
hplayer.diffExpRatio(whichPlayer, diff, during)
hplayer.setExpRatio(whichPlayer, val, during)
hplayer.addExpRatio(whichPlayer, val, during)
hplayer.subExpRatio(whichPlayer, val, during)
hplayer.getExpRatio(whichPlayer)
hplayer.diffSellRatio(whichPlayer, diff, during)
hplayer.setSellRatio(whichPlayer, val, during)
hplayer.addSellRatio(whichPlayer, val, during)
hplayer.subSellRatio(whichPlayer, val, during)
hplayer.getSellRatio(whichPlayer)
hplayer.getTotalGold(whichPlayer)
hplayer.addTotalGold(whichPlayer, val)
hplayer.getTotalGoldCost(whichPlayer)
hplayer.addTotalGoldCost(whichPlayer, val)
hplayer.getTotalLumber(whichPlayer)
hplayer.addTotalLumber(whichPlayer, val)
hplayer.getTotalLumberCost(whichPlayer)
hplayer.addTotalLumberCost(whichPlayer, val)
hplayer.adjustGold(whichPlayer)
hplayer.adjustLumber(whichPlayer)
hplayer.getGold(whichPlayer)
hplayer.setGold(whichPlayer, gold, u)
hplayer.addGold(whichPlayer, gold, u)
hplayer.subGold(whichPlayer, gold, u)
hplayer.getLumber(whichPlayer)
hplayer.setLumber(whichPlayer, lumber, u)
hplayer.addLumber(whichPlayer, lumber, u)
hplayer.subLumber(whichPlayer, lumber, u)
hplayer.getFoodUsed(whichPlayer)
hplayer.setFoodUsed(whichPlayer, value)
hplayer.getFoodCap(whichPlayer)
hplayer.setFoodCap(whichPlayer, value)
hplayer.getFoodCapCeiling(whichPlayer)
hplayer.setFoodCapCeiling(whichPlayer, value)
</div></code></pre>
<ul>
<li>[L]<strong>lib\quest.lua</strong></li>
</ul>
<pre class="hljs"><code><div>hquest.del(q, delay)
hquest.create(options)
hquest.flash()
hquest.setCompleted(q)
hquest.setFailed(q)
hquest.setDiscovered(q)
</div></code></pre>
<ul>
<li>[L]<strong>lib\rect.lua</strong></li>
</ul>
<pre class="hljs"><code><div>hrect.alloc(r, name)
hrect.world()
hrect.camera()
hrect.playable()
hrect.create(x, y, w, h, name)
hrect.getName(whichRect)
hrect.getX(whichRect)
hrect.getY(whichRect)
hrect.getWidth(whichRect)
hrect.getHeight(whichRect)
hrect.getMinX(whichRect)
hrect.getMinY(whichRect)
hrect.getMaxX(whichRect)
hrect.getMaxY(whichRect)
hrect.del(whichRect, delay)
hrect.lock(options)
</div></code></pre>
<ul>
<li>[L]<strong>lib\shop.lua</strong></li>
</ul>
<pre class="hljs"><code><div></div></code></pre>
<ul>
<li>[L]<strong>lib\skill\basic.lua</strong></li>
</ul>
<pre class="hljs"><code><div>hskill.avoid(whichUnit)
hskill.invulnerable(whichUnit, during, effect)
hskill.invulnerableRange(x, y, radius, filter, during, effect)
hskill.pause(whichUnit, during, pauseColor)
hskill.invisible(whichUnit, during, transition, effect)
hskill.visible(whichUnit, during, transition, effect)
hskill.modelEffect(whichUnit, whichAbility, abilityLevel, during)
hskill.diy(options)
</div></code></pre>
<ul>
<li>[L]<strong>lib\skill\complex.lua</strong></li>
</ul>
<pre class="hljs"><code><div>hskill.knocking(options)
hskill.split(options)
hskill.broken(options)
hskill.swim(options)
hskill.silent(options)
hskill.unarm(options)
hskill.fetter(options)
hskill.bomb(options)
hskill.lightningChain(options)
hskill.crackFly(options)
hskill.rangeSwim(options)
hskill.whirlwind(options)
hskill.leap(options)
hskill.leapPaw(options)
hskill.leapRange(options)
hskill.leapReflex(options)
hskill.rectangleStrike(options)
</div></code></pre>
<ul>
<li>[L]<strong>lib\skill\damage.lua</strong></li>
</ul>
<pre class="hljs"><code><div>local _damageTtg(targetUnit, damage, fix, rgb, speed)
hskill.damage(options)
hskill.damageStep(options)
hskill.damageRange(options)
hskill.damageGroup(options)
</div></code></pre>
<ul>
<li>[L]<strong>lib\skill\ring.lua</strong></li>
</ul>
<pre class="hljs"><code><div>hring.check(id)
hring.insert(whichUnit, id, level)
hring.remove(whichUnit, id)
</div></code></pre>
<ul>
<li>[L]<strong>lib\skill.lua</strong></li>
</ul>
<pre class="hljs"><code><div>hskill.getAttribute(abilityId)
hskill.addProperty(whichUnit, abilityId, level)
hskill.subProperty(whichUnit, abilityId, level)
hskill.getName(abilityId)
hskill.add(whichUnit, abilityId, level, during)
hskill.set(whichUnit, abilityId, level, during)
hskill.del(whichUnit, abilityId, delay)
hskill.forever(whichUnit, abilityId)
hskill.has(whichUnit, abilityId)
hskill.setCoolDown(whichUnit, abilityID, coolDown)
</div></code></pre>
<ul>
<li>[L]<strong>lib\slk.lua</strong></li>
</ul>
<pre class="hljs"><code><div>hslk.i2v(id, ...)
hslk.n2v(name)
hslk.n2i(name)
hslk.classIds(class)
hslk.typeIds(t)
hslk.misc(...)
</div></code></pre>
<ul>
<li>[L]<strong>lib\sound.lua</strong></li>
</ul>
<pre class="hljs"><code><div>hsound.voiceCreate(path, duration, is3D, channel, volume, pitch)
hsound.voice(s)
hsound.voice2Player(s, whichPlayer)
hsound.voice2Unit(s, volumePercent, u)
hsound.voice2XYZ(s, x, y, z)
hsound.voice2Rect(s, whichRect, during)
hsound.bgmStop(whichPlayer)
hsound.bgm(musicFileName, whichPlayer)
hsound.bgmVolume(percent, whichPlayer)
</div></code></pre>
<ul>
<li>[L]<strong>lib\sync.lua</strong></li>
</ul>
<pre class="hljs"><code><div>hsync.key()
hsync.mix(key, array)
hsync.call(key, callback, array)
hsync.init()
hsync.send(key, array)
hsync.onSend(key, callback)
</div></code></pre>
<ul>
<li>[L]<strong>lib\textTag.lua</strong></li>
</ul>
<pre class="hljs"><code><div>htextTag.del(ttg, delay)
htextTag.create(msg, size, color, opacity, during)
htextTag.create2XY(x, y, msg, size, color, opacity, during, zOffset)
htextTag.create2Unit(u, msg, size, color, opacity, during, zOffset)
htextTag.createFollowUnit(u, msg, size, color, opacity, during, zOffset)
htextTag.getSize(ttg)
htextTag.getColor(ttg)
htextTag.getMsg(ttg)
htextTag.getOpacity(ttg)
htextTag.getDuring(ttg)
htextTag.setVelocity(ttg, xSpeed, ySpeed)
htextTag.style(ttg, showType, xSpeed, ySpeed)
htextTag.model(options)
</div></code></pre>
<ul>
<li>[L]<strong>lib\texture.lua</strong></li>
</ul>
<pre class="hljs"><code><div>htexture.cinematicFilterGeneric(duration, bmode, tex, red0, green0, blue0, trans0, red1, green1, blue1, trans1)
htexture.mark(path, during, whichPlayer, red, green, blue)
htexture.alertCircle(diameter, x, y, during, token, color)
</div></code></pre>
<ul>
<li>[L]<strong>lib\time.lua</strong></li>
</ul>
<pre class="hljs"><code><div>htime.clock()
htime.his()
htime.timerInPool()
htime.timerInKernel(period, yourFunc, isInterval)
htime.kernelInfo(t)
htime.getSetTime(t)
htime.getRemainTime(t)
htime.getElapsedTime(t)
htime.pause(t)
htime.resume(t)
htime.delTimer(t)
htime.setTimeout(frequency, yourFunc, title)
htime.setInterval(frequency, yourFunc, title)
</div></code></pre>
<ul>
<li>[L]<strong>lib\unit.lua</strong></li>
</ul>
<pre class="hljs"><code><div>hunit.getAvatar(uOrId)
hunit.getSight(uOrId)
hunit.getNSight(uOrId)
hunit.getAttackSides1(uOrId)
hunit.getMaxLife(u)
hunit.getCurLife(u)
hunit.setCurLife(u, val)
hunit.addCurLife(u, val)
hunit.subCurLife(u, val)
hunit.getMaxMana(u)
hunit.getCurMana(u)
hunit.setCurMana(u, val)
hunit.addCurMana(u, val)
hunit.subCurMana(u, val)
hunit.getCurLifePercent(u)
hunit.setCurLifePercent(u, val)
hunit.getCurManaPercent(u)
hunit.setCurManaPercent(u, val)
hunit.addExp(u, val, showEffect)
hunit.setPeriod(u, life)
hunit.getPeriod(u)
hunit.getPeriodRemain(u)
hunit.setFacing(u, facing)
hunit.getFacing(u)
hunit.show(u)
hunit.hide(u)
hunit.pause(u)
hunit.resume(u)
hunit.x(u)
hunit.y(u)
hunit.z(u)
hunit.enablePunish(u)
hunit.disablePunish(u)
hunit.setInvulnerable(u, flag)
hunit.setAnimateSpeed(whichUnit, speed, during)
hunit.setRGBA(whichUnit, red, green, blue, opacity, during)
hunit.delRGBA(whichUnit, buffKey)
hunit.resetRGBA(whichUnit)
hunit.getOwner(whichUnit)
hunit.portal(whichUnit, x, y, facing)
hunit.animate(whichUnit, animate)
hunit.embed(u, options)
hunit.create(options)
hunit.getId(uOrId)
hunit.getName(u)
hunit.getUserData(u)
hunit.setUserData(u, val, during)
hunit.setColor(u, color)
hunit.del(targetUnit, delay)
hunit.kill(targetUnit, delay)
hunit.exploded(targetUnit, delay)
hunit.setCanFly(u)
hunit.getFlyHeight(u)
hunit.setFlyHeight(u, height, speed)
</div></code></pre>
<ul>
<li>[L]<strong>lib\weather.lua</strong></li>
</ul>
<pre class="hljs"><code><div>hweather.del(w, delay)
hweather.create(options)
</div></code></pre>
<ul>
<li>[L]<strong>slk\pilot.lua</strong></li>
</ul>
<pre class="hljs"><code><div>_ability(_v)
_item(_v)
_unit(_v)
_buff(_v)
_upgrade(_v)
_attr(_v)
_xtras(_v)
_ring(_v)
_onSkillStudy(_v)
_onSkillEffect(_v)
_onItemGet(_v)
_onItemUsed(_v)
_onRing(_v)
</div></code></pre>
<ul>
<li>[L]<strong>slk\setter.lua</strong></li>
</ul>
<pre class="hljs"><code><div>F6V_I_SYNTHESIS(formula)
local F6_RING(_v)
F6V_A(_v)
F6V_U(_v)
F6V_COURIER_SKILL()
F6V_I_CD(_v)
F6V_I_SHADOW(_v)
F6V_I(_v)
F6V_B(_v)
F6V_UP(_v)
</div></code></pre>
<ul>
<li>[L]<strong>slk\slk.lua</strong></li>
</ul>
<pre class="hljs"><code><div>hslk_init()
local hslk_cli_set(_v)
hslk_conf(conf)
hslk_ability(_v)
hslk_ability_empty(_v)
hslk_ability_ring(_v)
hslk_unit(_v)
hslk_hero(_v)
hslk_courier(_v)
hslk_item_synthesis(formula)
hslk_item(_v)
hslk_item_fleeting(Name, file, modelScale, moveHeight)
hslk_buff(_v)
hslk_upgrade(_v)
</div></code></pre>
<ul>
<li>[B]slk\system.lua</li>
</ul>
<h2 id="%E5%B1%9E%E6%80%A7%E7%B3%BB%E7%BB%9F">属性系统</h2>
<p>h-lua 有强大的属性系统</p>
<p>能轻松几行代码就实现绝大多数属性的实时改动</p>
<h3 id="hattributesetrelation">hattribute.setRelation</h3>
<p>属性每1单位映射 可以模拟三围加成等</p>
<h3 id="goldratio--lumberratio--expratio--sellratio">gold_ratio / lumber_ratio / exp_ratio / sell_ratio</h3>
<p>黄金率 / 木头率 / 经验率 / 售卖率（%）</p>
<ul>
<li>影响资源获取率 售卖率以默认的50%为准，假如某玩家作者设置TA的售卖率不等于50，那么会自动算出差值，给予扣款或补偿</li>
</ul>
<h3 id="life--lifeback">life / life_back</h3>
<p>生命 / 生命恢复</p>
<ul>
<li>单位的最大生命值 / 每秒对生命恢复的量 最小值 1</li>
</ul>
<h3 id="mana--manaback">mana / mana_back</h3>
<p>魔法 / 魔法恢复</p>
<ul>
<li>单位的最大魔法值 / 每秒对魔法恢复的量 最小值 1</li>
</ul>
<h3 id="move">move</h3>
<p>移动力</p>
<ul>
<li>[范围] 0～?取决于地图的平衡常数设置(一般设为522)<br>
每秒移动最大距离</li>
<li>数值无上限，但地图移动上限为522</li>
<li>假设移动力为2000，则实际移动仍为522，而其他由移动力影响的技能属性将以2000点计算</li>
</ul>
<h3 id="defend--defendwhite--defendgreen">defend / defend_white / defend_green</h3>
<p>护甲（总/白/绿）</p>
<ul>
<li>你可以使用hattr.set改动defend,实际改的是defend_green</li>
</ul>
<h3 id="damagereduction--damagedecrease">damage_reduction / damage_decrease</h3>
<p>固定值减伤 / 百分比减伤</p>
<ul>
<li>可以直接抵消伤害</li>
<li>减伤最低为0，也就是不能反增伤</li>
</ul>
<h3 id="sight--sightday-sightnight">sight / sight_day /sight_night</h3>
<p>视野(变化) / 白天视野 / 黑夜视野</p>
<ul>
<li>单位的视野 sight指的是变化值，attr设定=时不是终点值而是“变化”的目标值</li>
<li>你可以使用hattr.set设置sight_day /sight_night,但并不能真的设置分别的视野，实际改动的变化值</li>
</ul>
<h3 id="avoid">avoid</h3>
<p>回避（%）</p>
<ul>
<li>当英雄受到的是“攻击”造成的伤害时会有一定几率闪避抵抗，并且使攻击特效失效</li>
<li>闪避效果只有当英雄回避属性大于0%时才会开始生效 回避可以无限堆，回避率达到100%时一般情况下回避所有伤害 回避率=(回避-命中)（%）</li>
<li>如果该次伤害为无视回避，则回避失效（breakArmorType）</li>
</ul>
<h3 id="aim">aim</h3>
<p>命中（%）</p>
<ul>
<li>aim 命中直接抵消回避生效的效果值 回避率=(回避-命中)（%）</li>
</ul>
<h3 id="punish--punishcurrent">punish / punish_current</h3>
<p>僵直 / 当前硬直</p>
<ul>
<li>僵直的单位移动攻速会被限制 硬直扣减量与受到伤害相关</li>
<li>受到快速多段伤害或高伤害时，将很容易被击破而僵直 硬直被破坏时会僵直5秒,并重置硬直条，期间受到伤害可能会再次僵直</li>
<li>硬直的僵直5秒的体现是攻击速度和移动速度被极大地减少 硬直未被击破时每隔5秒恢复100点</li>
</ul>
<h3 id="punishoppose">punish_oppose</h3>
<p>僵直抵抗（%）</p>
<ul>
<li>不造成伤害时，不减少硬直</li>
<li>硬直抵抗按百分比减少硬直的减速效果(减的是攻速及移速)</li>
<li>硬直抵抗的效果最高只能减少90% 力量（总/白/绿）</li>
</ul>
<h3 id="str--strwhite--strgreen">str / str_white / str_green</h3>
<p>力量（总/白/绿）</p>
<ul>
<li>你可以使用hattr.set设置str,但实际改动的是str_green</li>
</ul>
<h3 id="agi--agiwhite--agigreen">agi / agi_white / agi_green</h3>
<p>敏捷（总/白/绿）</p>
<ul>
<li>你可以使用hattr.set设置str,但实际改动的是agi_green</li>
</ul>
<h3 id="int--intwhite--intgreen">int / int_white / int_green</h3>
<p>智力（总/白/绿）</p>
<ul>
<li>你可以使用hattr.set设置int,但实际改动的是int_green</li>
</ul>
<h3 id="attack--attackwhite--attackgreen">attack / attack_white / attack_green</h3>
<p>攻击</p>
<ul>
<li>一个单位的当前攻击浮动+白+绿</li>
<li>由于存在区间浮动，所以这个值每次get都会不一样</li>
<li>你可以使用hattr.set设置attack,但实际改动的是attack_green</li>
<li>在h-lua下所有单位造成的伤害都视为攻击attack（包括原生技能）</li>
<li>在调用攻击附魔后，攻击可以附带元素 单位进行攻击的能力，一般分为近战或者远程 攻击间隔</li>
</ul>
<h3 id="attackspace">attack_space</h3>
<p>攻击间隔</p>
<ul>
<li>根据原始攻速和攻击速度计算出的间隔值</li>
<li>但是set的时候实际设置的是原始间隔(attack_space_origin)</li>
</ul>
<h3 id="attackrange">attack_range</h3>
<p>攻击范围</p>
<ul>
<li>单位进行攻击的最大距离</li>
</ul>
<h3 id="attackspeed">attack_speed</h3>
<p>攻击速度（%）</p>
<ul>
<li>攻击一次的间隔 假设当前攻速增益为 x% ： 攻击间隔公式：(基本间隔*100) / (100+x) [单位：击/秒]</li>
</ul>
<h3 id="reborn">reborn</h3>
<p>复活时间（秒）</p>
<ul>
<li>此值默认-999，无复活效果 当这个值大于等于0时，且单位是英雄，单位会拥有复活的效果 复活的流程执行是一个默认函数，有需要可修改 hevent_default_actions.hero.reborn</li>
</ul>
<h3 id="cure">cure</h3>
<p>治疗效果（%）</p>
<ul>
<li>增强治疗的效果 影响hunit.addLife/Mana的效果 life_back/mana_back已自动生效</li>
</ul>
<h3 id="hemophagia--hemophagiaskill">hemophagia / hemophagia_skill</h3>
<p>吸血（%） / 技能吸血（%）</p>
<ul>
<li>攻击 / 技能造成伤害时触发吸血 以实际伤害及吸血百分比为计算</li>
</ul>
<h3 id="damageamplitude">damage_amplitude</h3>
<p>伤害增幅（%）</p>
<ul>
<li>增幅属性可以提高所有的伤害（包括真实伤害）</li>
<li>如增幅100%，则攻击、物品、技能等所有伤害都会提高100% 伤害增幅在暴击分裂等之前 负重（Kg）</li>
</ul>
<h3 id="weight--weightcurrent">weight / weight_current</h3>
<p>负重（Kg）</p>
<ul>
<li>负重决定你身上能够佩戴多少重量的物品装备</li>
<li>常规地图物品都设为0kg，所以负重是无效的</li>
</ul>
<h3 id="invincible">invincible</h3>
<p>无敌（%）</p>
<ul>
<li>收到伤害时瞬间无敌抵消的的几率</li>
</ul>
<h3 id="damagerebound--damagereboundoppose">damage_rebound / damage_rebound_oppose</h3>
<p>伤害反射（%） / 反伤抵抗（%）</p>
<ul>
<li>可反射受到的一切伤害</li>
<li>反伤数值机制精度为0.01,小于0.01无效 默认最低为0%（无反射）最高无限定</li>
<li>以最终伤害值计算反射，反射的伤害不会再次成为反射源</li>
</ul>
<h3 id="knockingodds--knockingextent--knockingoppose">knocking_odds / knocking_extent / knocking_oppose</h3>
<p>暴击几率（%）/ 暴击伤害加成（%） / 暴击抵抗（%）</p>
<ul>
<li>这是单位本体的暴击，与xtras的无关，可线性叠加</li>
<li>本体暴击自动无视回避（模拟原生魔兽效果）</li>
<li>暴击抵抗阻碍物理暴击发生，包括本体的和xtras</li>
</ul>
<h3 id="splitoppose">split_oppose</h3>
<p>分裂抵抗（%）</p>
<ul>
<li>阻碍分裂发生</li>
</ul>
<h3 id="hemophagiaoppose--hemophagiaskilloppose">hemophagia_oppose / hemophagia_skill_oppose</h3>
<p>吸血抵抗（%） / 技能吸血抵抗（%）</p>
<ul>
<li>抵抗攻击吸血 / 技能吸血效果</li>
</ul>
<h3 id="punishoppose">punish_oppose</h3>
<p>僵直抵抗（%）</p>
<ul>
<li>抵抗僵直效果</li>
</ul>
<h3 id="splitoppose">split_oppose</h3>
<p>分裂抵抗（%）</p>
<ul>
<li>阻碍分裂发生</li>
</ul>
<h3 id="swimoppose">swim_oppose</h3>
<p>眩晕抵抗（%）</p>
<ul>
<li>眩晕抵抗同时减少受到眩晕的几率及眩晕时间 眩晕几率=原眩晕几率%-眩晕抵抗（%）,最小0%即无效</li>
<li>眩晕时间=原眩晕时间*(100%-眩晕抵抗%)（s）,最小0秒即无效 沉默抵抗（%）</li>
</ul>
<h3 id="silentoppose">silent_oppose</h3>
<p>沉默抵抗（%）</p>
<ul>
<li>阻碍沉默发生</li>
</ul>
<h3 id="unarmoppose">unarm_oppose</h3>
<p>缴械抵抗（%）</p>
<ul>
<li>阻碍缴械发生</li>
</ul>
<h3 id="fetteroppose">fetter_oppose</h3>
<p>定身抵抗（%）</p>
<ul>
<li>阻碍定身发生</li>
</ul>
<h3 id="bomboppose">bomb_oppose</h3>
<p>爆破抵抗（%）</p>
<ul>
<li>阻碍爆破发生</li>
</ul>
<h3 id="lightningchainoppose">lightning_chain_oppose</h3>
<p>闪电链抵抗（%）</p>
<ul>
<li>阻碍闪电链发生</li>
</ul>
<h3 id="crackflyoppose">crack_fly_oppose</h3>
<p>击飞抵抗（%）</p>
<ul>
<li>阻碍击飞发生</li>
</ul>
<h3 id="buffoppose">buff_oppose</h3>
<p>强化阻碍（%）</p>
<ul>
<li>当xtras使用attr增强单位时，效果会被此值减轻</li>
</ul>
<h3 id="debuffoppose">debuff_oppose</h3>
<p>负面抵抗（%）</p>
<ul>
<li>当xtras使用attr削弱单位时，效果会被此值减轻</li>
</ul>
<h3 id="breakarmortype">BREAK_ARMOR_TYPE</h3>
<p>无视装甲</p>
<ul>
<li>详情请看const</li>
<li>无视护甲 defend</li>
<li>无视回避 avoid</li>
<li>无视无敌 invincible</li>
<li>无视附魔 enchant</li>
<li>无视只对正数值有效 额外特效</li>
</ul>
<h3 id="xtras">xtras</h3>
<p>以事件作驱动，引发额外限定效果的操作</p>
<ul>
<li>由于非常复杂，请查看attr的xtras源码段注释说明 常见例子：</li>
</ul>
<pre class="hljs"><code><div>{ on = CONST_EVENT.attack, action = <span class="hljs-string">"triggerUnit.attr.attack_speed"</span>, odds = <span class="hljs-number">20.0</span>, val = <span class="hljs-number">1.5</span>, during = <span class="hljs-number">3.0</span>, effect = <span class="hljs-literal">nil</span> },
{ on = CONST_EVENT.attack, action = <span class="hljs-string">"attackUnit.attr.attack_speed"</span>, odds = <span class="hljs-number">20.0</span>, val = <span class="hljs-number">1.5</span>, during = <span class="hljs-number">3.0</span>, effect = <span class="hljs-literal">nil</span> },
{ on = CONST_EVENT.skill, action = <span class="hljs-string">"castUnit.attr.attack_green"</span>, odds = <span class="hljs-number">20.0</span>, val = <span class="hljs-number">2</span>, during = <span class="hljs-number">3.0</span>, effect = <span class="hljs-literal">nil</span> },
{ on = CONST_EVENT.item, action = <span class="hljs-string">"useUnit.attr.int_white"</span>, odds = <span class="hljs-number">20.0</span>, val = <span class="hljs-number">2</span>, during = <span class="hljs-number">3.0</span>, effect = <span class="hljs-literal">nil</span> },
{ on = CONST_EVENT.attack, action = <span class="hljs-string">"targetUnit.spec.knocking"</span>, odds = <span class="hljs-number">100</span>, percent = <span class="hljs-number">100</span>, effect = <span class="hljs-literal">nil</span> },
{ on = CONST_EVENT.skill, action = <span class="hljs-string">"targetUnit.spec.knocking"</span>, odds = <span class="hljs-number">100</span>, percent = <span class="hljs-number">100</span>, effect = <span class="hljs-literal">nil</span> },
{ on = CONST_EVENT.attack, action = <span class="hljs-string">"targetUnit.spec.split"</span>, odds = <span class="hljs-number">100</span>, percent = {<span class="hljs-number">30</span>,<span class="hljs-number">50</span>}, radius = <span class="hljs-number">250</span> },
{ on = CONST_EVENT.attack, action = <span class="hljs-string">"targetUnit.spec.swim"</span>,odds = <span class="hljs-number">0.0</span>, val = <span class="hljs-number">0.0</span>, during = <span class="hljs-number">0.0</span>, effect = <span class="hljs-literal">nil</span>},
{ on = CONST_EVENT.attack, action = <span class="hljs-string">"targetUnit.spec.broken"</span>,odds = <span class="hljs-number">0.0</span>, val = <span class="hljs-number">0.0</span>, effect = <span class="hljs-literal">nil</span>},
{ on = CONST_EVENT.attack, action = <span class="hljs-string">"targetUnit.spec.silent"</span>,odds = <span class="hljs-number">0.0</span>, val = <span class="hljs-number">0.0</span>, during = <span class="hljs-number">0.0</span>, effect = <span class="hljs-literal">nil</span>},
{ on = CONST_EVENT.attack, action = <span class="hljs-string">"targetUnit.spec.unarm"</span>,odds = <span class="hljs-number">0.0</span>, val = <span class="hljs-number">0.0</span>, during = <span class="hljs-number">0.0</span>, effect = <span class="hljs-literal">nil</span>},
{ on = CONST_EVENT.attack, action = <span class="hljs-string">"targetUnit.spec.fetter"</span>,odds = <span class="hljs-number">0.0</span>, val = <span class="hljs-number">0.0</span>, during = <span class="hljs-number">0.0</span>, effect = <span class="hljs-literal">nil</span>},
{ on = CONST_EVENT.attack, action = <span class="hljs-string">"targetUnit.spec.bomb"</span>,odds = <span class="hljs-number">0.0</span>, radius = <span class="hljs-number">0.0</span>, val = <span class="hljs-number">0.0</span>, effect = <span class="hljs-literal">nil</span>},
{ on = CONST_EVENT.damage, action = <span class="hljs-string">"targetUnit.spec.lightning_chain"</span>, odds = <span class="hljs-number">50</span>, val = <span class="hljs-number">100</span>, qty = <span class="hljs-number">0</span>, rate = <span class="hljs-number">0.0</span> },
{ on = CONST_EVENT.beDamage, action = <span class="hljs-string">"sourceUnit.spec.crack_fly"</span>, odds = <span class="hljs-number">50</span>, val = <span class="hljs-number">100</span>, distance = <span class="hljs-number">300</span>, height = <span class="hljs-number">200</span>, during = <span class="hljs-number">0.5</span> },
{ on = CONST_EVENT.attack, action = <span class="hljs-string">"sourceUnit.spec.paw"</span>, odds = <span class="hljs-number">50</span>, val = <span class="hljs-string">'damage'</span>, effect = <span class="hljs-string">'Abilities\\Weapons\\GargoyleMissile\\GargoyleMissile.mdl'</span>, radius = <span class="hljs-number">50</span>, odds = <span class="hljs-number">50</span>, speed = <span class="hljs-number">10</span>, <span class="hljs-built_in">deg</span> = <span class="hljs-number">30</span>, distance = <span class="hljs-number">500</span>, qty = <span class="hljs-number">3</span> }
</div></code></pre>
<h3 id="enchant">enchant</h3>
<p>附魔系统介绍</p>
<ul>
<li>e_开头的系列设定 如：e_fire / e_fire_attack / e_fire_oppose 附魔，是框架内定义的一种概念 附魔带出元素集合，它们有：物理、魔法、火、焰、水、风、雷、木、毒等等很多种<br>
附魔被伤害类型和attr引用，独立存在，仅呈现辅助式伤害</li>
<li>每个属性在造成对应的伤害时，会获得百分比加成，无上限，而抵抗则直接减少加成比例</li>
<li>下列例子不考虑其他因素： 默认+10%参考henchant.INTRINSIC_ADDITION 原伤100%，类型包含火。火加成为100%，火抵抗为40%，最终伤害170%（默认会+10%）<br>
原伤100%，类型包含火。火加成为40%，火抵抗为40%，最终伤害110%（默认会+10%） 原伤100%，类型包含火。火加成为0%，火抵抗为40%，最终伤害70%（反而不如无类型了）<br>
原伤100%，类型不包含火。火加成为40%，火抵抗为40%，最终伤害100%（类型无火，则火加成/抵抗皆无效） 伤害类型(伤害类型绑定附魔的元素)</li>
</ul>
<h3 id="damagetype">DAMAGE_TYPE</h3>
<p>伤害类型一般指伤害的类型，类型之间可以随意的重复叠加</p>
<ul>
<li>详情请看const</li>
<li>例如一个伤害类型：可以是{physical,fire,fire}物理+火，而且火占到了三分之二的比例。 一般情况下，一次伤害总是各种类型混合的，各个类型会按照各自的规则来计算削弱和加强，不必担心混乱<br>
例如{magic,fire}这种类型，这次伤害是200点，他们会各自平分伤害：magic100，fire100，如果魔法就按魔抗计算被抵消，火伤害依然是有100点的 伤害来源</li>
</ul>
<h3 id="damagesrc">DAMAGE_SRC</h3>
<p>伤害方式共 4 种</p>
<ul>
<li>详情请看const</li>
<li>[未知方式]没有被定义的都会是未知来源，一种概念</li>
<li>[攻击方式]普通攻击、魔兽原生技能造成的伤害</li>
<li>[技能方式]技能设定（触发技能buff、技能debuff、技能特效）</li>
<li>[物品方式]物品伤害，一种概念</li>
<li>伤害一般计算优先级：原生护甲伤害计算-&gt;方式类型判定-&gt;无视判定-&gt;附魔数值整合-&gt;暴击及抵抗-&gt;回避、命中-&gt;减伤-&gt;造成伤害-&gt;分裂、吸血、技能吸血-&gt;僵直、反伤-&gt;额外特效</li>
</ul>
<h2 id="japi">JAPI</h2>
<h3 id="sdk%E9%A9%AC%E4%BB%94%E8%87%AA%E5%B8%A6%E4%B8%80%E4%BA%9Bjapi%E5%AE%9E%E8%A3%85%E5%87%BD%E6%95%B0%E4%B8%80%E8%A7%88">SDK马仔自带一些JAPI，实装函数一览</h3>
<blockquote>
<p>以代码提示函数存在作为依据，下列函数名仅供参考</p>
</blockquote>
<pre class="hljs"><code><div>    EXSetEffectXY
    DzIsKeyDown
    EXGetUnitArrayString
    DzFrameSetPoint
    DzAPI_UnitType_SetEnum_PreventOrReguirePlace
    EXSetUnitReal
    EXSetUnitCollisionType
    DzAPI_UnitType_GetUnitTypeDataAbilID
    GetUnitState
    DzAPI_UnitType_SetEnum_armor
    SetUnitState
    RequestExtraIntegerData
    EXGetUnitReal
    DzAPI_UnitType_GetUnitTypeDataBoolean
    EXGetUnitString
    EXSetUnitString
    DzAPI_Map_SaveServerValue
    EXGetUnitInteger
    EXSetEffectSpeed
    DzAPI_Map_IsBlueVIP
    EXEffectMatReset
    EXSetUnitInteger
    DzGetWheelDelta
    EXBlendButtonIcon
    DzAPI_UnitType_CountUnitTypeDataArrayTechID
    EXSetItemDataString
    DzAPI_UnitType_GetEnum_weapTp
    EXSetUnitArrayString
    EXGetEffectY
    EXPauseUnit
    EXGetAbilityDataString
    EXSetUnitMoveType
    EXSetUnitFacing
    DzSetCustomFovFix
    EXGetUnitAbility
    EXExecuteScript
    DzGetPlayerName
    EXGetUnitAbilityByIndex
    EXGetAbilityId
    DzAPI_UnitType_SetUnitTypeDataArrayString
    EXGetAbilityState
    EXSetAbilityState
    EXEffectMatRotateX
    EXGetAbilityDataReal
    EXSetAbilityDataReal
    DzEvent_Tech_Finish
    EXGetAbilityDataInteger
    DzSimpleFontStringFindByName
    EXSetAbilityDataInteger
    DzAPI_UnitType_ResizeUnitTypeDataArrayAbilID
    EXSetAbilityString
    DzAPI_UnitType_GetEnum_type
    EXSetAbilityDataString
    DzDotaInfo_Item_HE
    DzAPI_UnitType_CountUnitTypeDataArrayItemID
    EXSetAbilityAEmeDataA
    DzGetPlayerSelectedHero
    DzAPI_UnitType_ResizeUnitTypeDataArrayReal
    EXGetBuffDataString
    GetEventDamage
    DzGetPlayerInitGold
    EXSetBuffDataString
    EXGetAbilityString
    EXGetItemDataString
    DzTriggerRegisterMouseEventByCode
    DzDotaInfo_Item
    EXGetEventDamageData
    EXSetEventDamage
    EXDisplayChat
    EXSetEffectSize
    EXDclareButtonIcon
    EXSetEffectZ
    DzSetParams
    DzLoadToc
    EXGetEffectX
    DzAPI_UnitType_SetUnitTypeDataArrayAbilID
    EXGetEffectZ
    RequestExtraBooleanData
    EXGetEffectSize
    EXEffectMatRotateY
    DzFrameSetAnimateOffset
    DzDotaInfo_IsPlayerRandom
    EXEffectMatRotateZ
    DzAPI_UnitType_GetUnitTypeDataRequiresamount
    DzEvent_Building_Dead
    DzAPI_UnitType_SetUnitTypeDataReal
    DzAPI_Map_Ladder_SetPlayerStat
    DzEvent_Unit_Hired
    EXEffectMatScale
    DzDebugString
    DzUnitLearningSkill
    DzAPI_UnitType_CountUnitTypeDataArrayAbilID
    DzGetGameMode
    DzDotaInfo_IsRepicked
    DzDotaInfo_Item_TM
    DzEvent_Building_Cancel
    DzAPI_UnitType_SetEnum_typeModify
    DzEvent_Building_Start
    DzEvent_Building_Finish
    DzAPI_UnitType_GetUnitTypeDataRequires
    DzEvent_Hero_Dead
    DzFrameGetText
    DzAPI_UnitType_GetUnitTypeDataArrayString
    DzEvent_Unit_Dead
    DzEvent_Unit_Start
    DzEvent_Unit_Cancel
    DzAPI_UnitType_GetEnum_weapType
    DzEvent_Unit_Finish
    DzAPI_UnitType_GetUnitTypeDataReal
    DzEvent_Tech_Start
    DzGetClientHeight
    DzEvent_Tech_Cancel
    DzSimpleFrameFindByName
    DzFrameGetPortrait
    DzGetMouseTerrainX
    DzEvent_Hero_Level
    DzGetColor
    DzEvent_Unit_ChangeOwner
    DzEvent_Item_Drop
    DzEvent_Item_Pickup
    DzEvent_Item_Use
    DzEvent_Item_Sell
    DzGetMouseY
    DzPlatform_HasGameOver
    DzPlatform_HasGameOver_Player
    DzPlatform_GameStart
    DzAPI_UnitType_GetEnum_movetp
    DzAPI_Map_MissionComplete
    DzAPI_Map_GetActivityData
    DzAPI_Map_GetMapLevel
    DzAPI_Map_GetServerValue
    DzAPI_Map_Stat_SetStat
    DzAPI_Map_Ladder_SetStat
    DzAPI_Map_IsRPGLobby
    DzAPI_Map_GetGameStartTime
    DzAPI_Map_IsRPGLadder
    DzFrameSetAlpha
    DzAPI_Map_GetMatchType
    DzAPI_Map_UpdatePlayerHero
    DzFrameClearAllPoints
    DzAPI_Map_GetLadderLevel
    DzAPI_Map_IsRedVIP
    DzAPI_Map_GetLadderRank
    DzAPI_Map_GetMapLevelRank
    DzAPI_Map_GetServerValueErrorCode
    DzAPI_Map_GetGuildName
    DzAPI_Map_GetGuildRole
    DzAPI_UnitType_GetUnitTypeDataArrayUnitID
    DzAPI_Map_GetMapConfig
    DzAPI_UnitType_SetUnitTypeDataArrayReal
    DzAPI_Map_HasMallItem
    DzTriggerRegisterWindowResizeEventByCode
    DzAPI_Map_ChangeStoreItemCount
    DzFrameGetParent
    DzAPI_Map_ChangeStoreItemCoolDown
    DzAPI_Map_ToggleStore
    DzAPI_Map_GetServerArchiveEquip
    DzAPI_Map_GetServerArchiveDrop
    DzFrameSetMinMaxValue
    DzFrameSetScript
    DzFrameGetMinimapButton
    DzAPI_Map_OrpgTrigger
    DzAPI_Map_GetUserID
    DzAPI_Map_GetPlatformVIP
    DzAPI_Map_SavePublicArchive
    DzAPI_Map_GetPublicArchive
    DzAPI_Map_UseConsumablesItem
    DzAPI_Map_Statistics
    RequestExtraStringData
    DzFrameGetHeroManaBar
    RequestExtraRealData
    DzSyncData
    DzAPI_UnitType_GetUnitTypeDataString
    DzAPI_CommonFunc_SetARGBColorValue
    DzAPI_UnitType_SetUnitTypeDataArrayUnitID
    DzAPI_CommonFunc_SetARGBColorValuePercent
    DzAPI_CommonFunc_GetARGBColorValue
    DzUnitDisableInventory
    DzAPI_CommonFunc_GetARGBColorValuePercent
    DzFrameSetScale
    DzAPI_UnitType_GetUnitTypeDataArrayReal
    DzAPI_UnitstateToInteger
    DzAPI_UnitType_GettUnitTypeDataRequirescount
    DzAPI_UnitType_GetEnum_PreventOrReguirePlaceCheck
    DzAPI_UnitType_GetUnitTypeDataInt
    DzAPI_UnitType_SetUnitTypeDataInt
    DzFrameCageMouse
    DzFrameSetScriptByCode
    DzAPI_UnitType_CountUnitTypeDataArrayReal
    DzAPI_UnitType_SetUnitTypeDataBoolean
    DzAPI_UnitType_CountUnitTypeDataArrayBoolean
    DzAPI_UnitType_ResizeUnitTypeDataArrayBoolean
    DzGetWindowHeight
    DzAPI_UnitType_GetUnitTypeDataArrayBoolean
    DzTriggerRegisterMouseWheelEventByCode
    DzAPI_UnitType_SetUnitTypeDataArrayBoolean
    DzAPI_UnitType_SetUnitTypeDataString
    DzAPI_UnitType_CountUnitTypeDataArrayString
    DzAPI_UnitType_ResizeUnitTypeDataArrayString
    DzAPI_UnitType_ResizeUnitTypeDataArrayTechID
    DzAPI_UnitType_GetUnitTypeDataArrayTechID
    DzAPI_UnitType_SetUnitTypeDataArrayTechID
    DzAPI_UnitType_SetUnitTypeDataAbilID
    DzAPI_UnitType_GetUnitTypeDataArrayAbilID
    DzAPI_UnitType_CountUnitTypeDataArrayUnitID
    DzAPI_UnitType_SetEnum_TargetTypeSeries
    DzAPI_UnitType_SetEnum_atkType
    DzAPI_UnitType_ResizeUnitTypeDataArrayUnitID
    DzTriggerRegisterMouseMoveEventByCode
    DzAPI_UnitType_ResizeUnitTypeDataArrayItemID
    DzAPI_UnitType_GetUnitTypeDataArrayItemID
    DzAPI_UnitType_SetUnitTypeDataArrayItemID
    DzAPI_UnitType_GetEnum_regenType
    DzAPI_UnitType_SetEnum_regenType
    DzAPI_UnitType_SetEnum_race
    DzAPI_UnitType_SetEnum_weapTp
    DzAPI_UnitType_GetEnum_defType
    DzAPI_UnitType_GetEnum_PreventOrReguirePlace
    DzAPI_UnitType_SetEnum_defType
    DzFrameGetTooltip
    DzAPI_UnitType_GetEnum_Primary
    DzAPI_UnitType_GetEnum_warpsOn
    DzFrameSetTooltip
    DzAPI_UnitType_SetEnum_warpsOn
    DzAPI_UnitType_GetEnum_atkType
    DzAPI_UnitType_SetEnum_weapType
    DzFrameSetStepValue
    DzAPI_UnitType_SetEnum_Primary
    DzFrameSetTextColor
    DzAPI_UnitType_SetEnum_movetp
    DzAPI_UnitType_GetEnum_buffType
    DzAPI_UnitType_SetEnum_buffType
    DzGetTriggerUIEventPlayer
    DzAPI_UnitType_GetEnum_race
    DzAPI_UnitType_GetEnum_deathType
    DzAPI_UnitType_SetEnum_deathType
    DzAPI_UnitType_GetEnum_armor
    DzAPI_UnitType_GetEnum_TargetTypeSeries
    DzAPI_UnitType_GetEnum_TargetTypeCheck
    DzAPI_UnitType_SetEnum_TargetTypeModify
    DzAPI_UnitType_SetEnum_type
    DzAPI_UnitType_GetEnum_typeCheck
    DzAPI_UnitType_SetEnum_PreventOrReguirePlaceModify
    DzAPI_UnitType_CountUnitTypeDataRequires
    DzAPI_UnitType_ResizeUnitTypeDataRequires
    DzGetConvertWorldPositionX
    DzAPI_UnitType_SetUnitTypeDataRequires
    DzSetUnitTexture
    DzAPI_UnitType_CountUnitTypeDataRequiresamount
    DzAPI_UnitType_ResizeUnitTypeDataRequiresamount
    DzAPI_UnitType_SetUnitTypeDataRequiresamount
    DzGetMouseXRelative
    DzGetMouseTerrainY
    DzFrameGetHeroBarButton
    DzGetMouseTerrainZ
    DzIsMouseOverUI
    DzGetMouseX
    DzGetLocale
    DzGetMouseYRelative
    DzSetMousePos
    DzTriggerRegisterMouseEvent
    DzTriggerRegisterKeyEvent
    DzTriggerRegisterKeyEventByCode
    DzTriggerRegisterMouseWheelEvent
    DzOriginalUIAutoResetPoint
    DzTriggerRegisterMouseMoveEvent
    DzGetTriggerKey
    DzGetTriggerKeyPlayer
    DzGetWindowWidth
    DzGetClientWidth
    DzGetWindowX
    DzGetWindowY
    DzTriggerRegisterWindowResizeEvent
    DzIsWindowActive
    DzTriggerRegisterSyncData
    DzSyncBuffer
    DzGetTriggerSyncData
    DzGetTriggerSyncPlayer
    DzFrameHideInterface
    DzFrameEditBlackBorders
    DzFrameGetMinimap
    DzFrameGetCommandBarButton
    DzFrameGetHeroHPBar
    DzExecuteFunc
    DzFrameGetItemBarButton
    DzFrameGetUpperButtonBarButton
    DzFrameGetChatMessage
    DzFrameGetUnitMessage
    DzFrameGetTopMessage
    DzGetConvertWorldPositionY
    DzFrameSetUpdateCallback
    DzGetUnitNeededXP
    DzFrameSetUpdateCallbackByCode
    DzFrameShow
    DzCreateFrame
    DzCreateSimpleFrame
    DzDestroyFrame
    DzFrameSetAbsolutePoint
    DzFrameSetEnable
    DzFrameGetAlpha
    DzGetTriggerUIEventFrame
    DzFrameFindByName
    DzSimpleTextureFindByName
    DzGetGameUI
    DzClickFrame
    DzEnableWideScreen
    DzFrameSetText
    DzFrameSetTextSizeLimit
    DzFrameGetTextSizeLimit
    DzGetMouseFocus
    DzFrameSetPriority
    DzFrameSetAllPoints
    DzFrameSetFocus
    DzFrameSetModel
    DzFrameGetEnable
    DzFrameSetAnimate
    DzFrameSetTexture
    DzFrameGetValue
    DzFrameSetValue
    DzFrameSetSize
    DzCreateFrameByTagName
    DzFrameSetVertexColor
    DzFrameSetParent
    DzFrameGetHeight
    DzFrameSetFont
    DzFrameSetTextAlignment
    DzFrameGetName
    DzConvertWorldPosition
    DzGetUnitUnderMouse
    DzDestructablePosition
    DzSetUnitPosition
    DzSetMemory
    DzSetUnitModel
    DzSetUnitID
    DzSetWar3MapMap
    DzUnitSilence
    DzUnitDisableAttack
</div></code></pre>
<h2 id="hslk-%E4%BD%BF%E7%94%A8%E5%85%A5%E9%97%A8">hslk 使用入门</h2>
<blockquote>
<p>hslk是h-lua的物编生成方式，只要在hslk目录中运用设定好的方法，即可创建物编</p>
</blockquote>
<h3 id="%E7%B1%BB%E5%9E%8B">类型</h3>
<pre class="hljs"><code><div>unit(common/hero/courier) 单位
item(common/synthesis) 物品
ability(common/empty/ring) 技能
buff(common) 魔法效果
upgrade(common) 科技
</div></code></pre>
<h3 id="%E4%B8%93%E5%B1%9E%E5%AD%97%E6%AE%B5">专属字段</h3>
<blockquote>
<p>改不了的字段定义了也没效</p>
</blockquote>
<pre class="hljs"><code><div>_id = <span class="hljs-string">"[改不了]自动生成的物编ID"</span>
_id_force = <span class="hljs-string">"[一般不用]自定义物编ID"</span>
_class = <span class="hljs-string">"[改不了]hslk数据类别"</span>
_type = <span class="hljs-string">"[一般不用]hslk数据形式"</span>
_parent = <span class="hljs-string">"模版物编ID"</span>
_overlie = <span class="hljs-string">"叠加"</span>
_weight = <span class="hljs-string">"重量"</span>
_attr = <span class="hljs-string">"属性"</span>
_ring = <span class="hljs-string">"光环"</span>
_remarks = <span class="hljs-string">"结尾灰字描述"</span>
_cooldown = <span class="hljs-string">"冷却时间"</span>
_cooldownTarget = <span class="hljs-string">"冷却技能目标"</span>
_shadow = <span class="hljs-string">"强制使用影子物品"</span>
</div></code></pre>
<h4 id="%E9%85%8D%E7%BD%AEhslk">配置hslk</h4>
<blockquote>
<p>hslk的数据配置在【你的项目】的hslk目录中，即可测试自动构建并读取</p>
<p>支持默认程度的自定义配置，例如物编文本生成时的颜色等</p>
<p>默认内置一套配置，使用conf方法全覆盖即可</p>
</blockquote>
<pre class="hljs"><code><div>hslk_conf({
  courierSkill = {
    <span class="hljs-comment">-- 信使技能-名称、热键、图标位置、冷却</span>
    blink = {
        Ubertip = <span class="hljs-string">"闪烁到任何地方"</span>, Art = <span class="hljs-string">"ReplaceableTextures\\CommandButtons\\BTNBlink.blp"</span>,
        Hotkey = <span class="hljs-string">'Q'</span>, Buttonpos_1 = <span class="hljs-number">0</span>, Buttonpos_2 = <span class="hljs-number">2</span>, Cool1 = <span class="hljs-number">10</span>
    },
    rangePickUp = {
        Ubertip = <span class="hljs-string">"将附近地上的物品拾取到身上"</span>, Art = <span class="hljs-string">"ReplaceableTextures\\CommandButtons\\BTNPickUpItem.blp"</span>,
        Hotkey = <span class="hljs-string">'W'</span>, Buttonpos_1 = <span class="hljs-number">1</span>, Buttonpos_2 = <span class="hljs-number">2</span>, Cool1 = <span class="hljs-number">5</span>
    },
    separate = {
        Ubertip = <span class="hljs-string">"将合成或重叠的物品拆分成零件"</span>, Art = <span class="hljs-string">"ReplaceableTextures\\CommandButtons\\BTNRepair.blp"</span>,
        Hotkey = <span class="hljs-string">'E'</span>, Buttonpos_1 = <span class="hljs-number">2</span>, Buttonpos_2 = <span class="hljs-number">2</span>, Cool1 = <span class="hljs-number">5</span>
    },
    deliver = {
        Ubertip = <span class="hljs-string">"将所有物品依照顺序传送给英雄，当你的英雄没有空余物品位置，物品会返回给信使"</span>, Art = <span class="hljs-string">"ReplaceableTextures\\CommandButtons\\BTNLoadPeon.blp"</span>,
        Hotkey = <span class="hljs-string">'R'</span>, Buttonpos_1 = <span class="hljs-number">3</span>, Buttonpos_2 = <span class="hljs-number">2</span>, Cool1 = <span class="hljs-number">5</span>
    },
  },
  <span class="hljs-comment">-- 描述文本颜色,可配置 hcolor 里拥有的颜色函数，也可以配置 hex 6位颜色码</span>
  color = {
    hotKey = <span class="hljs-string">"ffcc00"</span>, <span class="hljs-comment">-- 热键</span>
    itemCoolDown = <span class="hljs-string">"ccffff"</span>, <span class="hljs-comment">-- 物品冷却时间</span>
    itemAttr = <span class="hljs-string">"b0f26e"</span>, <span class="hljs-comment">-- 物品属性</span>
    itemOverlie = <span class="hljs-string">"ff59ff"</span>, <span class="hljs-comment">-- 物品叠加</span>
    itemWeight = <span class="hljs-string">"ee82ee"</span>, <span class="hljs-comment">-- 物品重量</span>
    itemRemarks = <span class="hljs-string">"969696"</span>, <span class="hljs-comment">-- 物品备注</span>
    itemFragment = hcolor.orange, <span class="hljs-comment">-- 物品零部件</span>
    itemProfit = <span class="hljs-string">"ffd88c"</span>, <span class="hljs-comment">-- 物品合成品</span>
    abilityCoolDown = <span class="hljs-string">"ccffff"</span>, <span class="hljs-comment">-- 技能冷却时间</span>
    abilityAttr = <span class="hljs-string">"b0f26e"</span>, <span class="hljs-comment">-- 技能属性</span>
    abilityRemarks = <span class="hljs-string">"969696"</span>, <span class="hljs-comment">-- 技能备注</span>
    ringArea = <span class="hljs-string">"99ccff"</span>, <span class="hljs-comment">-- 光环范围</span>
    ringTarget = <span class="hljs-string">"99ccff"</span>, <span class="hljs-comment">-- 光环作用目标</span>
    heroWeapon = <span class="hljs-string">"ff3939"</span>, <span class="hljs-comment">-- 英雄攻击武器类型</span>
    heroAttack = <span class="hljs-string">"ff8080"</span>, <span class="hljs-comment">-- 英雄基础攻击</span>
    heroRange = <span class="hljs-string">"99ccff"</span>, <span class="hljs-comment">-- 英雄攻击范围</span>
    heroPrimary = <span class="hljs-string">"ffff00"</span>, <span class="hljs-comment">-- 英雄主属性</span>
    heroSecondary = <span class="hljs-string">"ffffcc"</span>, <span class="hljs-comment">-- 英雄主属性</span>
    heroMove = <span class="hljs-string">"ccffcc"</span>, <span class="hljs-comment">-- 英雄移动</span>
  }, 
})
</div></code></pre>
<h3 id="%E9%85%8D%E7%BD%AE%E7%89%A9%E5%93%81%E5%90%88%E6%88%90%E5%85%AC%E5%BC%8F%E4%B8%80%E8%88%AC%E5%AE%8C%E7%BE%8E%E6%94%AF%E6%8C%81hslk%E5%88%9B%E5%BB%BA%E7%9A%84%E6%B3%A8%E5%86%8C%E7%89%A9%E5%93%81">配置物品合成公式（一般完美支持hslk创建的注册物品）</h3>
<blockquote>
<p>必须提前配置公式，再调用hslk创建物品，否则物品说明文本不会自动协助合成补充</p>
</blockquote>
<pre class="hljs"><code><div>例子1 &quot;小刀割大树=小刀+大树&quot; 2个不一样的合1个
例子2 &quot;三头地狱犬的神识=地狱狗头x3&quot; 3个一样的合1个
例子3 &quot;精灵神水x2=精灵的眼泪x50&quot; 50个一样的合一种,但得到2个
例子4 {
    {&quot;小刀割大树&quot;,1},{&quot;小刀&quot;,1},{&quot;大树&quot;,1}
}
对象型配置第一项为结果物品(适合物品名称包含特殊字符的物品，如+/=影响公式的符号)
</div></code></pre>
<h3 id="%E6%94%AF%E6%8C%81%E5%A4%9A%E7%A7%8D%E5%85%AC%E5%BC%8F%E9%85%8D%E7%BD%AE%E5%BD%93%E5%85%AC%E5%BC%8F%E5%86%85%E5%AD%98%E5%9C%A8%E8%BF%99%E7%A7%8D%E7%A0%B4%E5%9D%8F%E8%8C%83%E5%BC%8F%E7%9A%84%E5%90%8D%E7%A7%B0%E6%97%B6%E5%8F%AF%E4%BD%BF%E7%94%A8table%E8%BF%9B%E8%A1%8C%E8%AE%BE%E5%AE%9A">支持多种公式配置，当公式内存在+=这种破坏范式的名称时，可使用table进行设定</h3>
<pre class="hljs"><code><div>hslk_item_synthesis({
    <span class="hljs-string">"璀璨精气球=精气球+璀璨"</span>,
    <span class="hljs-string">"重剑=铁剑x2"</span>,
    <span class="hljs-string">"刺客短剑=铁剑+闪避护符"</span>,
    <span class="hljs-string">"淬火剑=重剑+淬火石"</span>,
    {
        {<span class="hljs-string">"小刀割大树"</span>,<span class="hljs-number">1</span>},{<span class="hljs-string">"小刀"</span>,<span class="hljs-number">1</span>},{<span class="hljs-string">"大树"</span>,<span class="hljs-number">1</span>}
    }
})
</div></code></pre>
<h3 id="%E6%9E%84%E5%BB%BA%E7%89%A9%E7%BC%96%E5%8D%95%E4%BD%8D">构建物编单位</h3>
<pre class="hljs"><code><div>hslk_unit({
    Name = <span class="hljs-string">"大步兵"</span>,
    abilList = <span class="hljs-string">"Avul,Apit,Aneu"</span>,
    file = <span class="hljs-string">"units\\human\\TheCaptain\\TheCaptain"</span>,
    Art = <span class="hljs-string">"ReplaceableTextures\\CommandButtons\\BTNTheCaptain.blp"</span>,
    pathTex = <span class="hljs-string">"PathTextures\\4x4SimpleSolid.tga"</span>,
    modelScale = <span class="hljs-number">1.10</span>,
    scale = <span class="hljs-number">1.10</span>,
    HP = <span class="hljs-number">100</span>,
    spd = <span class="hljs-number">0</span>,
    sight = <span class="hljs-number">800</span>,
    nsight = <span class="hljs-number">800</span>,
    unitSound = <span class="hljs-string">"HighElfSwordsman"</span>,
    weapsOn = <span class="hljs-number">0</span>,
    race = <span class="hljs-string">"human"</span>,
    UberSplat = <span class="hljs-string">"HSMA"</span>,
})
</div></code></pre>
<h3 id="%E6%9E%84%E5%BB%BA%E7%89%A9%E7%BC%96%E7%89%A9%E5%93%81">构建物编物品</h3>
<pre class="hljs"><code><div>hslk_item({
    Name = <span class="hljs-string">"闪避护符"</span>,
    Art = <span class="hljs-string">"ReplaceableTextures\\CommandButtons\\BTNTalisman.blp"</span>,
    goldcost = <span class="hljs-number">3500</span>,
    lumbercost = <span class="hljs-number">0</span>,
    powerup = <span class="hljs-number">0</span>,
    sellable = <span class="hljs-number">1</span>,
    pawnable = <span class="hljs-number">1</span>,
    droppable = <span class="hljs-number">1</span>,
    Hotkey = <span class="hljs-string">"Q"</span>,
    _remarks = <span class="hljs-string">"戴上这个护符就能闪避，天下哪有那么神奇的事？！"</span>,
    _weight= <span class="hljs-number">0.4</span>,
    _attr = _attr({
        avoid = <span class="hljs-string">"+3"</span>,
        xtras= {
          {
            on = CONST_EVENT.attack
            action = <span class="hljs-string">"triggerUnit.attr.attack_speed"</span>,
            odds = <span class="hljs-number">8</span>,
            val = <span class="hljs-number">10</span>,
            during = <span class="hljs-number">3</span>,
            effect = <span class="hljs-string">"Abilities\\Spells\\NightElf\\Starfall\\StarfallTarget.mdl"</span>,
          },
       }
    }),
})
</div></code></pre>
<h3 id="%E6%9E%84%E5%BB%BAfake%E5%85%89%E7%8E%AF%E6%8A%80%E8%83%BD">构建fake光环技能</h3>
<pre class="hljs"><code><div>hslk_ability_ring({
    Name = <span class="hljs-string">"月神强击"</span>,
    Hotkey = <span class="hljs-string">"E"</span>,
    race = <span class="hljs-string">"human"</span>,
    Art = <span class="hljs-string">"ReplaceableTextures\\PassiveButtons\\PASBTNTrueShot.blp"</span>,
    _ring = _ring({
        effect = <span class="hljs-string">"Abilities\\Spells\\NightElf\\TrueshotAura\\TrueshotAura.mdl"</span>,
        effectTarget = <span class="hljs-string">"Abilities\\Spells\\Other\\GeneralAuraTarget\\GeneralAuraTarget.mdl"</span>,
        radius = <span class="hljs-number">600</span>,
        target = <span class="hljs-string">"air,ground,friend,self,vuln,invu"</span>,
        attr = {
            attack_green = <span class="hljs-string">"+90"</span>,
            aim = <span class="hljs-string">"+20"</span>
        }
    }),
})
</div></code></pre>
<h3 id="%E7%89%A9%E5%93%81%E4%B9%9F%E5%8F%AF%E4%BB%A5%E5%B5%8C%E5%A5%97%E5%85%89%E7%8E%AF%E6%8A%80%E8%83%BD">物品也可以嵌套光环技能</h3>
<pre class="hljs"><code><div>hslk_item({
    Name = <span class="hljs-string">"铁剑"</span>,
    Art = <span class="hljs-string">"ReplaceableTextures\\CommandButtons\\BTNSteelMelee.blp"</span>,
    goldcost = <span class="hljs-number">800</span>,
    lumbercost = <span class="hljs-number">0</span>,
    powerup = <span class="hljs-number">0</span>,
    sellable = <span class="hljs-number">1</span>,
    pawnable = <span class="hljs-number">1</span>,
    droppable = <span class="hljs-number">1</span>,
    Hotkey = <span class="hljs-string">"D"</span>,
    _remarks = <span class="hljs-string">"精铁铸造的大剑"</span>,
    _attr = {
        attack_green = <span class="hljs-string">"+33"</span>,
    },
    _ring = {
        effect = <span class="hljs-string">"Abilities\\Spells\\Orc\\CommandAura\\CommandAura.mdl"</span>,
        effectTarget = <span class="hljs-string">"Abilities\\Spells\\NightElf\\BattleRoar\\RoarTarget.mdl"</span>,
        attachTarget = <span class="hljs-string">"overhead"</span>,
        radius = <span class="hljs-number">600</span>,
        target = <span class="hljs-string">"air,ground,friend,self,vuln,invu"</span>,
        attr = {
            life = <span class="hljs-string">"+50"</span>,
        }
    },
})
</div></code></pre>
<h3 id="%E8%87%AA%E5%AE%9A%E4%B9%89%E7%89%A9%E7%BC%96%E6%A8%A1%E7%89%88">自定义物编模版</h3>
<pre class="hljs"><code><div>hslk_unit({
  _parent = <span class="hljs-string">"hpea"</span>
})
</div></code></pre>
<h3 id="%E8%87%AA%E5%AE%9A%E4%B9%89%E7%89%A9%E7%BC%96id">自定义物编ID</h3>
<pre class="hljs"><code><div>hslk_unit({
  _id_force = <span class="hljs-string">"U001"</span>
})
</div></code></pre>
<h2 id="hslk-%E4%BD%BF%E7%94%A8%E8%BF%9B%E9%98%B6">hslk 使用进阶</h2>
<h3 id="%E7%89%A9%E5%93%81%E4%B8%BB%E5%8A%A8%E6%8A%80%E8%83%BD%E7%BB%91%E5%AE%9A">物品主动技能绑定</h3>
<pre class="hljs"><code><div>hslk_item({
  Name = <span class="hljs-string">"跳跳剑"</span>,
  _cooldown = <span class="hljs-number">2</span>,
  _cooldownTarget = CONST_ABILITY_TARGET.location.value,
  _onItemUsed = _onItemUsed(<span class="hljs-function"><span class="hljs-keyword">function</span><span class="hljs-params">(evtData)</span></span>
    hunit.portal(evtData.triggerUnit, evtData.targetX, evtData.targetY)
  <span class="hljs-keyword">end</span>),
})
</div></code></pre>
<h3 id="%E6%8A%80%E8%83%BD%E4%B8%BB%E5%8A%A8%E7%BB%91%E5%AE%9A">技能主动绑定</h3>
<pre class="hljs"><code><div>hslk_ability({
  Name = <span class="hljs-string">"主动技能一个"</span>,
  _onSkillEffect = _onSkillEffect(<span class="hljs-function"><span class="hljs-keyword">function</span><span class="hljs-params">(evtData)</span></span>
    <span class="hljs-comment">-- 技能搞起来</span>
  <span class="hljs-keyword">end</span>)
})
</div></code></pre>
<h3 id="%E5%A4%9A%E7%BA%A7%E6%8A%80%E8%83%BD%E9%85%8D%E7%BD%AE">多级技能配置</h3>
<pre class="hljs"><code><div>hslk_ability({
  Name = <span class="hljs-string">"多级的技能"</span>,
  levels= <span class="hljs-number">3</span>,
  DataA = {<span class="hljs-number">0</span>,<span class="hljs-number">0</span>,<span class="hljs-number">0</span>},
  DataB = {<span class="hljs-number">0</span>,<span class="hljs-number">0</span>,<span class="hljs-number">0</span>},
  Cool = {<span class="hljs-number">0</span>,<span class="hljs-number">0</span>,<span class="hljs-number">0</span>},
  Cost = {<span class="hljs-number">0</span>,<span class="hljs-number">0</span>,<span class="hljs-number">0</span>},
})
</div></code></pre>
<h3 id="hslk%E5%B1%9E%E6%80%A7%E7%9A%84%E8%8E%B7%E5%8F%96">hslk属性的获取</h3>
<blockquote>
<p>hslk生成的物编，在游戏脚本运行时，可以超级方便地自由读取数据</p>
</blockquote>
<pre class="hljs"><code><div>hslk.i2v(id) <span class="hljs-comment">--根据物编ID，获取全数据</span>
hslk.n2v(id) <span class="hljs-comment">--根据物编Name，获取全数据，如果名字有重复，会返回多组数据</span>
hslk.n2i(id) <span class="hljs-comment">--根据物编Name，获取物编ID，如果名字有重复，只返回第一个ID</span>
</div></code></pre>
<h3 id="hslk%E5%B1%9E%E6%80%A7%E7%9A%84%E8%8E%B7%E5%8F%96slk%E6%95%B0%E6%8D%AE">hslk属性的获取slk数据</h3>
<pre class="hljs"><code><div>hslk.i2v(id,<span class="hljs-string">"slk"</span>) <span class="hljs-comment">--slk数据放在第1级的slk的key里</span>
hslk.i2v(id,<span class="hljs-string">"_id"</span>) <span class="hljs-comment">--hlua的自定义数据也在第1级里</span>
</div></code></pre>
<blockquote>
<p>注意，slk数据的值，一开始获取都是字符串，需要自己转换</p>
</blockquote>
<h3 id="hslki2v%E7%9A%84%E5%A4%9A%E7%BA%A7%E8%8E%B7%E5%8F%96%E5%86%99%E6%B3%95">hslk.i2v的多级获取写法</h3>
<pre class="hljs"><code><div>hslk.i2v(id,<span class="hljs-string">"slk"</span>,<span class="hljs-string">"Primary"</span>) <span class="hljs-comment">--获取一个英雄的主属性串 STR|AGI|INT|_</span>
</div></code></pre>
<blockquote>
<p>无效路径，则返回nil</p>
</blockquote>
<h3 id="hslk%E7%9A%84-class-%E5%AD%97%E6%AE%B5">hslk的 _class 字段</h3>
<pre class="hljs"><code><div>hslk每组数据都必定会含有一个_class字段，是构建时用来记录数据类别的
技能时 _class = ability
单位时 _class = unit
物品时 _class = item
魔法效果时 _class = buff
科技时 _class = upgrade
在运行时，可以一次性获取所有某 class 下的ID字符串数组
hslk.classIds({&quot;ability&quot;,&quot;item&quot;})
</div></code></pre>
<h3 id="hslk%E7%9A%84-type-%E5%AD%97%E6%AE%B5">hslk的 _type 字段</h3>
<pre class="hljs"><code><div>hslk每组数据都必定会含有一个 _type 字段，是构建时用来记录数据类别的
_type 字段一般情况下都是 common
而引用hslk官方的拓展函数，如hslk_ability_empty,会有固定的搭配

_type 可以在定义时自定义值，你写什么就是什么，可用于后续脚本中的ID集合获取

在运行时，可以一次性获取所有某  type 下的ID字符串数组
hslk.typeIds({&quot;hero&quot;})
</div></code></pre>
<h3 id="hslk%E7%9A%84-misc">hslk的 Misc</h3>
<pre class="hljs"><code><div>hslk里面可以获取misc数据,如：
hslk.misc(&quot;Misc&quot;,&quot;FadeBuffMinDuration&quot;) --&quot;10&quot;

misc数据就是平衡常数界面等等的一些游戏框架式数据
如果你不清楚有什么值，可以参考 h-lua/docs/slk-misc.md
</div></code></pre>
<h3 id="hslk%E7%9A%84-%E8%87%AA%E5%AE%9A%E4%B9%89%E6%95%B0%E6%8D%AE">hslk的 自定义数据</h3>
<pre class="hljs"><code><div><span class="hljs-comment">-- hslk配置时，table里面可以像设置_type一样，定义你自己随心的值</span>
hslk_unit({
    _id_force = <span class="hljs-string">"xTYG"</span>,
    Name = <span class="hljs-string">"一个单位"</span>,
    _myData1 = <span class="hljs-number">1</span>,
    _myData2 = {<span class="hljs-number">0</span>},
})

<span class="hljs-comment">-- 在脚本中就可以像平时获取值一样获取</span>

hslk.i2v(<span class="hljs-string">"xTYG"</span>,<span class="hljs-string">"_myData1"</span>)
hslk.i2v(<span class="hljs-string">"xTYG"</span>,<span class="hljs-string">"_myData2"</span>)

hslk.i2v(hslk.n2i(<span class="hljs-string">"一个单位"</span>),<span class="hljs-string">"_myData1"</span>)
hslk.i2v(hslk.n2i(<span class="hljs-string">"一个单位"</span>),<span class="hljs-string">"_myData2"</span>)

hslk.n2v(<span class="hljs-string">"一个单位"</span>,<span class="hljs-string">"_myData1"</span>)
hslk.n2v(<span class="hljs-string">"一个单位"</span>,<span class="hljs-string">"_myData2"</span>)
</div></code></pre>
<h3 id="hslk%E4%B8%BA%E5%8D%95%E4%BD%8D%E6%B7%BB%E5%8A%A0%E6%8A%80%E8%83%BD%E4%BE%8B%E5%AD%90">hslk为单位添加技能例子</h3>
<pre class="hljs"><code><div><span class="hljs-comment">-- hslk可以自定义值上面已讲过，所以我们可以设定一些技能后面调用</span>
hslk_unit({
    _id_force = <span class="hljs-string">"xTYG"</span>,
    Name = <span class="hljs-string">"一个单位"</span>,
    _mySkillIds = {<span class="hljs-string">"A001"</span>,<span class="hljs-string">"A002"</span>},
})
<span class="hljs-comment">-- 后面脚本里：</span>
<span class="hljs-keyword">local</span> unitId = <span class="hljs-string">"xTYG"</span>
<span class="hljs-keyword">local</span> whichUnit= hunit.<span class="hljs-built_in">create</span>({whichPlayer=hplayer.players[<span class="hljs-number">1</span>],id = unitId,x=<span class="hljs-number">0</span>,y=<span class="hljs-number">0</span>})
<span class="hljs-keyword">local</span> mySkillIds = hslk.i2v(unitId,<span class="hljs-string">"_mySkillIds"</span>)
<span class="hljs-keyword">for</span> _,id <span class="hljs-keyword">in</span> <span class="hljs-built_in">ipairs</span>(mySkillIds)<span class="hljs-keyword">do</span>
  hskill.add(whichUnit,id)
<span class="hljs-keyword">end</span>

<span class="hljs-comment">-- 除此之外，你可以和原生一样直接在hslk设定技能：</span>
hslk_unit({
    _id_force = <span class="hljs-string">"xTYG"</span>,
    Name = <span class="hljs-string">"一个单位"</span>,
    abilList = <span class="hljs-string">"A001,A002"</span>,
})
<span class="hljs-comment">-- 后面框架会自动帮你处理数据，完事</span>
</div></code></pre>
<h2 id="slk%E5%8E%9F%E7%94%9F%E7%89%A9%E7%BC%96%E5%AD%97%E6%AE%B5">Slk原生物编字段</h2>
<pre class="hljs"><code><div>abilList = <span class="hljs-string">"主动技能ID列表"</span>
Requires = <span class="hljs-string">"科技树"</span>
Requiresamount = <span class="hljs-string">"科技树-需求值"</span>
Name = <span class="hljs-string">"名称"</span>
Description = <span class="hljs-string">"描述"</span>
Tip = <span class="hljs-string">"描述标题"</span>
Ubertip = <span class="hljs-string">"说明"</span>
Hotkey = <span class="hljs-string">"热键"</span>
Art = <span class="hljs-string">"图标"</span>
scale = <span class="hljs-string">"模型大小"</span>
file = <span class="hljs-string">"模型文件路径"</span>
Buttonpos = <span class="hljs-string">"X坐标"</span>
Buttonpos = <span class="hljs-string">"Y坐标"</span>
UnButtonpos = <span class="hljs-string">"X坐标-关闭"</span>
UnButtonpos = <span class="hljs-string">"Y坐标-关闭"</span>
selSize = <span class="hljs-string">"选择圈大小"</span>
colorR = <span class="hljs-string">"红"</span>
colorG = <span class="hljs-string">"绿"</span>
colorB = <span class="hljs-string">"蓝"</span>
armor = <span class="hljs-string">"装甲类型"</span>
Level = <span class="hljs-string">"等级"</span>
oldLevel = <span class="hljs-string">"等级(旧)"</span>
class = <span class="hljs-string">"分类"</span>
goldcost = <span class="hljs-string">"黄金"</span>
lumbercost = <span class="hljs-string">"木头"</span>
HP = <span class="hljs-string">"生命"</span>
stockStart = <span class="hljs-string">"开始库存"</span>
stockRegen = <span class="hljs-string">"补货周期"</span>
stockMax = <span class="hljs-string">"最大库存"</span>
prio = <span class="hljs-string">"优先权"</span>
morph = <span class="hljs-string">"有效的物品转换目标"</span>
drop = <span class="hljs-string">"死亡时掉落"</span>
powerup = <span class="hljs-string">"捡到时自动使用"</span>
sellable = <span class="hljs-string">"可以出售"</span>
pawnable = <span class="hljs-string">"可以抵押"</span>
droppable = <span class="hljs-string">"可以丢弃"</span>
pickRandom = <span class="hljs-string">"可以作为随机物品"</span>
uses = <span class="hljs-string">"使用次数"</span>
perishable = <span class="hljs-string">"使用后完全消失"</span>
usable = <span class="hljs-string">"主动使用"</span>
level = <span class="hljs-string">"等级"</span>
race = <span class="hljs-string">"种族"</span>
<span class="hljs-built_in">type</span> = <span class="hljs-string">"类别"</span>
manaN = <span class="hljs-string">"最大魔法值"</span>
regenMana = <span class="hljs-string">"魔法恢复"</span>
mana0 = <span class="hljs-string">"初始魔法"</span>
regenHP = <span class="hljs-string">"生命恢复"</span>
regenType = <span class="hljs-string">"生命恢复类型"</span>
fmade = <span class="hljs-string">"提供人口"</span>
fused = <span class="hljs-string">"占用人口"</span>
stockStart = <span class="hljs-string">"雇佣开始时间"</span>
stockRegen = <span class="hljs-string">"雇佣开始间隔"</span>
stockMax = <span class="hljs-string">"最大库存"</span>
sight = <span class="hljs-string">"白天视野"</span>
nsight = <span class="hljs-string">"夜晚视野"</span>
collision = <span class="hljs-string">"接触体积"</span>
modelScale = <span class="hljs-string">"模型缩放"</span>
fileVerFlags = <span class="hljs-string">"模型文件版本"</span>
scaleBull = <span class="hljs-string">"缩放投射物"</span>
scale = <span class="hljs-string">"选择圈缩放"</span>
selZ = <span class="hljs-string">"选择圈高度"</span>
selCircOnWater = <span class="hljs-string">"选择圈在水面上"</span>
red = <span class="hljs-string">"红"</span>
green = <span class="hljs-string">"绿"</span>
blue = <span class="hljs-string">"蓝"</span>
occH = <span class="hljs-string">"闭塞高度"</span>
maxPitch = <span class="hljs-string">"X轴最大旋转角度"</span>
maxRoll = <span class="hljs-string">"Y轴最大旋转角度"</span>
impactZ = <span class="hljs-string">"射弹碰撞偏移Z"</span>
impactSwimZ = <span class="hljs-string">"射弹碰撞偏移Z深水"</span>
launchX = <span class="hljs-string">"射弹偏移X"</span>
launchY = <span class="hljs-string">"射弹偏移Y"</span>
launchZ = <span class="hljs-string">"射弹偏移Z"</span>
launchSwimZ = <span class="hljs-string">"射弹偏移Z深水"</span>
unitSound = <span class="hljs-string">"单位声音"</span>
RandomSoundLabel = <span class="hljs-string">"声音随机"</span>
MovementSoundLabel = <span class="hljs-string">"声音移动"</span>
LoopingSoundFadeOut = <span class="hljs-string">"声音渐出"</span>
LoopingSoundFadeIn = <span class="hljs-string">"声音渐入"</span>
auto = <span class="hljs-string">"主动自动技能ID"</span>
Sellitems = <span class="hljs-string">"售出物品"</span>
Sellunits = <span class="hljs-string">"售出单位"</span>
Markitems = <span class="hljs-string">"制造物品"</span>
Builds = <span class="hljs-string">"可建造单位"</span>
Specialart = <span class="hljs-string">"特殊效果"</span>
unitShadow = <span class="hljs-string">"单位阴影"</span>
buildingShadow = <span class="hljs-string">"建筑阴影"</span>
shadowH = <span class="hljs-string">"阴影H"</span>
shadowW = <span class="hljs-string">"阴影W"</span>
shadowX = <span class="hljs-string">"阴影X"</span>
shadowY = <span class="hljs-string">"阴影Y"</span>
shadowOnWater = <span class="hljs-string">"深水有阴影"</span>
death = <span class="hljs-string">"死亡时间"</span>
deathType = <span class="hljs-string">"死亡类型"</span>
movetp = <span class="hljs-string">"移动类型"</span>
moveHeight = <span class="hljs-string">"移动高度"</span>
moveFloor = <span class="hljs-string">"最小高度"</span>
spd = <span class="hljs-string">"基础速度"</span>
maxSpd = <span class="hljs-string">"最大速度"</span>
minSpd = <span class="hljs-string">"最小速度"</span>
turnRate = <span class="hljs-string">"转身速率"</span>
acquire = <span class="hljs-string">"主动攻击范围"</span>
minRange = <span class="hljs-string">"最小攻击范围"</span>
weapsOn = <span class="hljs-string">"允许攻击"</span>
Missileart = <span class="hljs-string">"箭矢模型"</span>
Missilespeed = <span class="hljs-string">"箭矢速度"</span>
Missilearc = <span class="hljs-string">"箭矢弧度"</span>
MissileHoming = <span class="hljs-string">"箭矢自导"</span>
targs = <span class="hljs-string">"目标允许"</span>
atkType = <span class="hljs-string">"攻击类型"</span>
weapTp = <span class="hljs-string">"武器类型"</span>
weapType = <span class="hljs-string">"武器声音"</span>
spillRadius = <span class="hljs-string">"穿透伤害范围"</span>
spillDist = <span class="hljs-string">"穿透距离"</span>
damageLoss = <span class="hljs-string">"伤害衰减参数"</span>
showUI = <span class="hljs-string">"显示攻击UI"</span>
backSw = <span class="hljs-string">"攻击后摇"</span>
dmgpt = <span class="hljs-string">"攻击前摇"</span>
rangeN = <span class="hljs-string">"攻击范围"</span>
RngBuff = <span class="hljs-string">"攻击范围缓冲"</span>
dmgplus = <span class="hljs-string">"基础伤害"</span>
dmgUp = <span class="hljs-string">"攻击科技升级"</span>
sides = <span class="hljs-string">"伤害骰子面数"</span>
dice = <span class="hljs-string">"伤害骰子数量"</span>
splashTargs = <span class="hljs-string">"范围影响目标"</span>
cool = <span class="hljs-string">"攻击间隔"</span>
Farea = <span class="hljs-string">"全伤害范围"</span>
targCount = <span class="hljs-string">"最大目标数"</span>
Qfact = <span class="hljs-string">"小伤害参数"</span>
Qarea = <span class="hljs-string">"小伤害范围"</span>
Hfact = <span class="hljs-string">"中伤害参数"</span>
Harea = <span class="hljs-string">"中伤害范围"</span>
defType = <span class="hljs-string">"护甲类型"</span>
defUp = <span class="hljs-string">"护甲科技升级"</span>
def = <span class="hljs-string">"基础护甲"</span>
armor = <span class="hljs-string">"装甲类型（被击声音）"</span>
targType = <span class="hljs-string">"作为目标类型"</span>
Propernames = <span class="hljs-string">"英雄称谓"</span>
nameCount = <span class="hljs-string">"英雄称谓个数"</span>
Awakentip = <span class="hljs-string">"英雄唤醒提示"</span>
Revivetip = <span class="hljs-string">"英雄重生提示"</span>
Primary = <span class="hljs-string">"主属性"</span>
STR = <span class="hljs-string">"力量"</span>
STRplus = <span class="hljs-string">"力量成长"</span>
AGI = <span class="hljs-string">"敏捷"</span>
AGIplus = <span class="hljs-string">"敏捷成长"</span>
INT = <span class="hljs-string">"智力"</span>
INTplus = <span class="hljs-string">"智力成长"</span>
heroAbilList = <span class="hljs-string">"英雄技能ID列表"</span>
hideHeroMinimap = <span class="hljs-string">"隐藏英雄小地图"</span>
hideHeroBar = <span class="hljs-string">"隐藏英雄栏图标"</span>
hideHeroDeathMsg = <span class="hljs-string">"隐藏英雄死亡信息"</span>
Requiresacount = <span class="hljs-string">"科技树-使用等级数"</span>
Requires = <span class="hljs-string">"科技树-等级"</span>
Reviveat = <span class="hljs-string">"指定复活点"</span>
buffRadius = <span class="hljs-string">"路径-AI放置范围"</span>
buffType = <span class="hljs-string">"路径-AI放置类型"</span>
Revive = <span class="hljs-string">"可复活单位"</span>
Trains = <span class="hljs-string">"可训练单位"</span>
Upgrade = <span class="hljs-string">"可升级建筑"</span>
requirePlace = <span class="hljs-string">"路径-放置不允许"</span>
preventPlace = <span class="hljs-string">"路径-放置要求"</span>
requireWaterRadius = <span class="hljs-string">"路径-放置要求距离水的范围"</span>
pathTex = <span class="hljs-string">"路径纹理"</span>
uberSplat = <span class="hljs-string">"建筑地面纹理"</span>
nbrandom = <span class="hljs-string">"中立-可作为随机建筑"</span>
nbmmlcon = <span class="hljs-string">"中立-显示小地图"</span>
canBuildOn = <span class="hljs-string">"能被其他建筑建造"</span>
isBuildOn = <span class="hljs-string">"能建造在其他建筑上"</span>
tilesets = <span class="hljs-string">"大地图-地形设置"</span>
special = <span class="hljs-string">"大地图-分类-特殊"</span>
campaign = <span class="hljs-string">"大地图-分类-战役"</span>
inEditor = <span class="hljs-string">"大地图-可放置"</span>
dropItems = <span class="hljs-string">"大地图-死亡掉落物品"</span>
hostilePal = <span class="hljs-string">"大地图-可作为中立敌对"</span>
useClickHelper = <span class="hljs-string">"大地图-使用点击帮助"</span>
tilesetSpecific = <span class="hljs-string">"大地图-有地形指定数据"</span>
DependencyOr = <span class="hljs-string">"科技树-从属等价物"</span>
Researches = <span class="hljs-string">"科技树-可研究项目"</span>
upgrades = <span class="hljs-string">"使用的科技"</span>
EditorSuffix = <span class="hljs-string">"编辑器后缀"</span>
Casterupgradename = <span class="hljs-string">"魔法升级名字"</span>
Casterupgradetip = <span class="hljs-string">"魔法升级说明"</span>
Castrerupgradeart = <span class="hljs-string">"魔法升级图标"</span>
ScoreScreenIcon = <span class="hljs-string">"图标-记分屏"</span>
animProps = <span class="hljs-string">"要求动画名"</span>
Attachmentanimprops = <span class="hljs-string">"要求动画名-附加动画"</span>
Attachmentlinkprops = <span class="hljs-string">"要求动画名-链接名"</span>
Boneprops = <span class="hljs-string">"要求骨骼名"</span>
castpt = <span class="hljs-string">"动画-施法前摇"</span>
castbsw = <span class="hljs-string">"动画-施法后摇"</span>
blend = <span class="hljs-string">"动画-混合时间（秒）"</span>
run = <span class="hljs-string">"动画-跑步"</span>
walk = <span class="hljs-string">"动画-行走"</span>
propWin = <span class="hljs-string">"动画-转向角度"</span>
orientInterp = <span class="hljs-string">"动画-转向补正"</span>
teamColor = <span class="hljs-string">"队伍颜色"</span>
customTeamColor = <span class="hljs-string">"允许更改队伍颜色"</span>
elevPts = <span class="hljs-string">"高度变化-采样点数量"</span>
elevRad = <span class="hljs-string">"高度变化-采样范围"</span>
fogRad = <span class="hljs-string">"战争迷雾-采样范围"</span>
fatLOS = <span class="hljs-string">"不可见区域显示单位"</span>
repulse = <span class="hljs-string">"组群分离-允许"</span>
repulsePrio = <span class="hljs-string">"组群分离-优先"</span>
repulseParam = <span class="hljs-string">"组群分离-参数"</span>
repulseGroup = <span class="hljs-string">"组群分离-组号"</span>
isbldg = <span class="hljs-string">"是一个建筑"</span>
bldtm = <span class="hljs-string">"建造时间"</span>
bountyplus = <span class="hljs-string">"黄金奖励-值"</span>
bountysides = <span class="hljs-string">"黄金奖励-骰子面数"</span>
bountydice = <span class="hljs-string">"黄金奖励-骰子数量"</span>
goldRep = <span class="hljs-string">"修理黄金消耗"</span>
lumberRep = <span class="hljs-string">"修理木材消耗"</span>
reptm = <span class="hljs-string">"修理时间"</span>
lumberbountyplus = <span class="hljs-string">"木材奖励-值"</span>
lumberbountysides = <span class="hljs-string">"木材奖励-骰子面数"</span>
lumberbountydice = <span class="hljs-string">"木材奖励-骰子数量"</span>
cargoSize = <span class="hljs-string">"运输尺寸"</span>
hideOnMinimap = <span class="hljs-string">"隐藏小地图显示"</span>
points = <span class="hljs-string">"单位附加值"</span>
prio = <span class="hljs-string">"编队优先权"</span>
formation = <span class="hljs-string">"队形排列"</span>
canFlee = <span class="hljs-string">"可以逃跑"</span>
canSleep = <span class="hljs-string">"可以睡眠"</span>
checkDep = <span class="hljs-string">"科技树-检查等价所属"</span>
Effectsound = <span class="hljs-string">"声效-音效"</span>
Effectsoundlooped = <span class="hljs-string">"声效-音效（循环）"</span>
Researchtip = <span class="hljs-string">"学习技能提示"</span>
Researchubertip = <span class="hljs-string">"学习技能描述"</span>
Unorder = <span class="hljs-string">"命令-关闭"</span>
Orderon = <span class="hljs-string">"命令-激活"</span>
Order = <span class="hljs-string">"命令串"</span>
Orderoff = <span class="hljs-string">"命令-取消激活"</span>
Unhotkey = <span class="hljs-string">"热键-关闭"</span>
Researchhotkey = <span class="hljs-string">"热键-学习"</span>
Researchbuttonpos1 = <span class="hljs-string">"X坐标-学习"</span>
Researchbuttonpos2 = <span class="hljs-string">"Y坐标-学习"</span>
Unart = <span class="hljs-string">"图标-关闭"</span>
Researchart = <span class="hljs-string">"图标-学习"</span>
SpecialArt = <span class="hljs-string">"效果-特殊"</span>
Specialattach = <span class="hljs-string">"效果-特殊附加点"</span>
LightningEffect = <span class="hljs-string">"效果-闪电效果"</span>
EffectArt = <span class="hljs-string">"效果-目标点"</span>
TargetArt = <span class="hljs-string">"效果-目标"</span>
Targetattachcount = <span class="hljs-string">"效果-目标-附加数量"</span>
Targetattach = <span class="hljs-string">"效果-目标-附加"</span>
Areaeffectart = <span class="hljs-string">"效果-区域"</span>
Animnames = <span class="hljs-string">"施法动作"</span>
CasterArt = <span class="hljs-string">"效果-施法者"</span>
Casterattachcount = <span class="hljs-string">"效果-施法者-附加数量"</span>
Casterattach = <span class="hljs-string">"效果-施法者-附加"</span>
hero = <span class="hljs-string">"是否英雄技能"</span>
item = <span class="hljs-string">"是否物品技能"</span>
levels = <span class="hljs-string">"等级"</span>
reqLevel = <span class="hljs-string">"等级要求"</span>
levelSkip = <span class="hljs-string">"学习跳等级"</span>
priority = <span class="hljs-string">"魔法偷取优先级"</span>
BuffID = <span class="hljs-string">"魔法效果"</span>
EfctID = <span class="hljs-string">"区域持续效果"</span>
DataA = <span class="hljs-string">"数据A"</span>
DataB = <span class="hljs-string">"数据B"</span>
DataC = <span class="hljs-string">"数据C"</span>
DataD = <span class="hljs-string">"数据D"</span>
DataE = <span class="hljs-string">"数据E"</span>
DataF = <span class="hljs-string">"数据F"</span>
Cast = <span class="hljs-string">"施法时间"</span>
Cool = <span class="hljs-string">"冷却时间"</span>
Dur = <span class="hljs-string">"持续时间"</span>
HeroDur = <span class="hljs-string">"持续时间（英雄）"</span>
Cost = <span class="hljs-string">"魔法消耗"</span>
Rng = <span class="hljs-string">"施法距离"</span>
Area = <span class="hljs-string">"施法范围"</span>  
</div></code></pre>
<h2 id="slk%E4%B8%8Emisc%E6%95%B0%E6%8D%AE">Slk与MISC数据</h2>
<pre class="hljs"><code><div>[Ping](<span class="hljs-number">4</span>) =&gt; <span class="hljs-built_in">table</span>: {
    [PingAttackColor] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"255,255,0,0"</span>
    [PingColor] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"255,0,255,0"</span>
    [PingAdvisorColor] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"255,255,255,0"</span>
    [PingWaypointColor] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"255,255,255,25"</span>
}
[Misc](<span class="hljs-number">232</span>) =&gt; <span class="hljs-built_in">table</span>: {
    [FadeBuffMinDuration] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"10"</span>
    [BountyTextVelocity] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"0,0.03,100"</span>
    [GrantNormalXP] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"25"</span>
    [LumberTextVelocity] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"0,0.03,100"</span>
    [GoldTextFadeStart] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"1"</span>
    [DamageBonusMagic] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"1.25,0.75,2.00,0.35,1.00,0.50,0.05,1.00"</span>
    [FoggedAttackRevealRadius] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"200.0"</span>
    [BuildingUnblightRadius] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"350"</span>
    [FadeBuffMinAlpha] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"96"</span>
    [FollowItemRange] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"1000"</span>
    [FadeBuffMaxAlpha] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"255"</span>
    [GoldTextColor] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"255,255,220,0"</span>
    [BashTextVelocity] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"0,0.04,100"</span>
    [GoldTextLifetime] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"2"</span>
    [ShadowStrikeTextVelocity] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"0,0.04,100"</span>
    [ScaledAnimTime] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"60"</span>
    [AwakenLevelFactor] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">".20"</span>
    [GoldTextVelocity] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"0,0.03,100"</span>
    [CanDeactivateBarkskin] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"1"</span>
    [Dusk] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"18"</span>
    [ChanceToMiss] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"0"</span>
    [BountyTextColor] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"255,255,220,0"</span>
    [BulletDeathTime] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"5"</span>
    [StructureFollowRange] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"100"</span>
    [LumberTextColor] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"255,0,200,80"</span>
    [BuildingAngle] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"270"</span>
    [CriticalStrikeTextVelocity] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"0,0.04,100"</span>
    [BountyTextLifetime] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"3"</span>
    [LumberTextLifetime] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"2"</span>
    [MaxCollisionRadius] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"200"</span>
    [BountyTextFadeStart] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"2"</span>
    [NeedHeroXP] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"200"</span>
    [LumberTextFadeStart] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"1"</span>
    [// revivalTime] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"originalTime * level * ReviveTimeFactor"</span>
    [TradingIncLarge] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"0"</span>
    [SpellCastRangeBuffer] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"300"</span>
    [ReactionDelay] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"0.25"</span>
    [StructureDecayTime] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"15"</span>
    [MissTextColor] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"255,255,0,0"</span>
    [ItemShadowOffset] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"50,50"</span>
    [MissTextVelocity] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"0,0.03,100"</span>
    [MissTextLifetime] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"3"</span>
    [MissTextFadeStart] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"1"</span>
    [CriticalStrikeTextColor] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"255,255,0,0"</span>
    [DefendDeflection] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"0"</span>
    [ShadowStrikeTextFadeStart] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"2"</span>
    [CriticalStrikeTextLifetime] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"5"</span>
    [CriticalStrikeTextFadeStart] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"2"</span>
    [ShadowStrikeTextColor] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"255,160,255,0"</span>
    [ManaBurnTextVelocity] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"0,0.04,100"</span>
    [ShadowStrikeTextLifetime] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"5"</span>
    [ManaBurnTextColor] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"255,82,82,255"</span>
    [BuildingPlacementNotifyRadius] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"600"</span>
    [MorphLandClosest] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"1"</span>
    [ManaBurnTextLifetime] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"5"</span>
    [ManaBurnTextFadeStart] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"2"</span>
    [BashTextColor] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"255,0,0,255"</span>
    [IllusionsGetAttackSpeedBonus] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"0"</span>
    [BashTextLifetime] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"5"</span>
    [BashTextFadeStart] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"2"</span>
    [HeroExpRange] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"1200"</span>
    [LavaSpawnColor] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"255,255,255,255,255,220,220,220,255,185,185,185"</span>
    [ActiveButtonColor] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"255,75,150,255"</span>
    [DamageBonusNormal] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"1.00,1.50,1.00,0.70,1.00,1.00,0.05,1.00"</span>
    [CloseEnoughRange] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"100"</span>
    [NeutralUseNotifyRadius] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"900"</span>
    [StrRegenBonus] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"0"</span>
    [ReviveMaxTimeFactor] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"2.0"</span>
    [RootAngle] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"250"</span>
    [AttackHalfAngle] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"0.5"</span>
    [InvisibleUnitsBestowAuras] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"0"</span>
    [DyingRevealRadius] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"500.0"</span>
    [BoneDecayTime] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"60"</span>
    [DecayTime] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"2"</span>
    [FlyingHeroesBestowAuras] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"0"</span>
    [FogFlashTime] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"3"</span>
    [DissipateTime] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"3"</span>
    [CancelTime] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"3"</span>
    [EffectDeathTime] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"5"</span>
    [CanDeactivateBearForm] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"1"</span>
    [CreepCampPathingCellDistance] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"26"</span>
    [FollowRange] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"300"</span>
    [RallyZOffset] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"200"</span>
    [HeroMaxAwakenCostGold] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"1400"</span>
    [DayLength] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"480"</span>
    [Dawn] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"6"</span>
    [DayHours] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"24"</span>
    [GoldMineMaxGold] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"1000000"</span>
    [AllowMultiBounce] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"1"</span>
    [InvisSpeed] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"0.4"</span>
    [LowGoldAmount] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"1500"</span>
    [CanDeactivateWindWalk] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"0"</span>
    [GoldMineOwnDuration] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"2.0"</span>
    [IntManaBonus] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"0"</span>
    [// this is the speed units change visibility (smaller] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">""</span>cloak<span class="hljs-string">" slower)"</span>
    [SelectionCircleBaseZ] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"16"</span>
    [ItemShadowFile] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"Shadow"</span>
    [ItemShadowSize] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"120,120"</span>
    [StrAttackBonus] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"0"</span>
    [TownPortalCluster] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"1"</span>
    [AttackNotifyDelay] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"30.0"</span>
    [DrainTransfersLife] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"0"</span>
    [AttackNotifyRange] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"1250"</span>
    [CanDeactivateRavenForm] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"1"</span>
    [TradingIncSmall] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"0"</span>
    [MissDamageReduction] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"0."</span>
    [MagicImmunesResistDamage] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"1"</span>
    [MagicImmunesResistThorns] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"0"</span>
    [MagicImmunesResistLeech] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"0"</span>
    [MagicImmunesResistUltimates] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"0"</span>
    [CycloneStasis] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"0"</span>
    [GrantNormalXPFormulaB] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"5"</span>
    [ReviveTimeFactor] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"0.65"</span>
    [DepCheckAlias] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"1"</span>
    [MassTeleportCluster] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"1"</span>
    [DarkSummoningCluster] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"1"</span>
    [AmuletOfRecallCluster] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"1"</span>
    [MorphAlternateDisable] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"0"</span>
    [InvulnSummonDispelDamage] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"1"</span>
    [ConstructionDamageRefundPenalty] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"1"</span>
    [UpgradeDamageRefundPenalty] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"0"</span>
    [MaxUnitSpeed] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"522"</span>
    [EnsnareIsMagic] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"0"</span>
    [MinUnitSpeed] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"0"</span>
    [WebIsMagic] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"0"</span>
    [IllusionsGetAttackBonus] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"0"</span>
    [IllusionsGetMoveSpeedBonus] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"0"</span>
    [IllusionsGetDefenseBonus] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"0"</span>
    [IllusionsCanRestoreLife] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"0"</span>
    [IllusionsCanRestoreMana] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"0"</span>
    [IllusionsBestowAuras] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"0"</span>
    [CanDeactivateAvengerForm] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"0"</span>
    [IllusionsGetAutocast] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"0"</span>
    [GrantNormalXPFormulaA] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"1"</span>
    [DrainGivesBonusMana] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"0"</span>
    [PolymorphedUnitsBestowAuras] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"0"</span>
    [BurrowedUnitsBestowAuras] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"0"</span>
    [DamageBonusChaos] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00"</span>
    [AnimatedUnitsBestowAuras] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"0"</span>
    [MoveSpeedBonusesStack] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"1"</span>
    [DrainUsesEtheralBonus] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"0"</span>
    [DrainTransfersMana] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"0"</span>
    [AgiAttackSpeedBonus] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"0"</span>
    [DrainGivesBonusLife] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"0"</span>
    [EtherealDamageBonusAlly] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"1"</span>
    [CanDeactivateAvatar] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"0"</span>
    [CanDeactivateBladestorm] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"0"</span>
    [AgiMoveBonus] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"0"</span>
    [CanDeactivateBurrow] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"1"</span>
    [CanDeactivateCallToArms] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"1"</span>
    [CanDeactivateChemicalRage] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"0"</span>
    [CanDeactivateCorporealForm] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"1"</span>
    [DisplayBuildingStatus] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"0"</span>
    [CanDeactivateDefend] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"1"</span>
    [GrantNormalXPFormulaC] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"5"</span>
    [CanDeactivateDivineShield] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"1"</span>
    [CanDeactivateImmolation] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"1"</span>
    [CanDeactivateManaFlare] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"0"</span>
    [CanDeactivateManaShield] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"1"</span>
    [CanDeactivateMetamorphosis] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"0"</span>
    [CanDeactivateRoboGoblin] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"1"</span>
    [CanDeactivateStoneForm] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"1"</span>
    [CanDeactivateSubmerge] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"1"</span>
    [RelativeUpgradeCost] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"1"</span>
    [ItemSaleAggroRange] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"0"</span>
    [UnitSaleAggroRange] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"0"</span>
    [AbilSaleAggroRange] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"0"</span>
    [AbolishMagicDispelSmart] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"0"</span>
    [UpgradeInProgressIdChange] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"1"</span>
    [GlobalExperience] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"1"</span>
    [HeroMaxAwakenCostLumber] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"350"</span>
    [MaxLevelHeroesDrainExp] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"1"</span>
    [BuildingKillsGiveExp] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"0"</span>
    [DisplayEnemyInventory] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"1"</span>
    [AgiDefenseBonus] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"0"</span>
    [HeroMaxReviveCostGold] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"700"</span>
    [AwakenLumberLevelFactor] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">".20"</span>
    [HeroMaxReviveCostLumber] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"0"</span>
    [HeroMaxReviveTime] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"150"</span>
    [GuardReturnTime] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"5.0"</span>
    [HeroReviveManaStart] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"1"</span>
    [HeroReviveManaFactor] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"0.0"</span>
    [HeroReviveLifeFactor] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"1.0"</span>
    [HeroAwakenManaStart] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"0"</span>
    [PawnItemRate] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"0.50"</span>
    [HeroAwakenManaFactor] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"0.0"</span>
    [HeroAwakenLifeFactor] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"0.5"</span>
    [// goldRevivalCost] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"originalCost * (ReviveBaseFactor + (ReviveLevelFactor*(level-1)))"</span>
    [// lumberRevivalCost] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"originalCost * (ReviveBaseLumberFactor + (ReviveLumberLevelFactor*(level-1)))"</span>
    [ReviveBaseFactor] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">".40"</span>
    [ReviveLevelFactor] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">".10"</span>
    [ReviveBaseLumberFactor] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"0"</span>
    [DamageBonusSpells] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"1.00,1.00,1.00,1.00,1.00,0.75,0.05,1.00"</span>
    [ReviveLumberLevelFactor] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"0"</span>
    [ReviveMaxFactor] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"4.0"</span>
    [FrostAttackSpeedDecrease] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"0"</span>
    [AwakenBaseFactor] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">".80"</span>
    [FrostMoveSpeedDecrease] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"0"</span>
    [AwakenBaseLumberFactor] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">".80"</span>
    [AwakenMaxFactor] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"8.0"</span>
    [MinBldgSpeed] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"25"</span>
    [MaxBldgSpeed] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"400"</span>
    [MaxHeroLevel] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"10"</span>
    [MaxUnitLevel] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"99"</span>
    [GrantHeroXP] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"100,120,160,220,300"</span>
    [HeroFactorXP] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"80,70,60,50,0"</span>
    [EtherealHealBonus] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"1.66"</span>
    [SummonedKillFactor] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"0.5"</span>
    [StrHitPointBonus] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"0"</span>
    [IntRegenBonus] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"0"</span>
    [AgiDefenseBase] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"0"</span>
    [// f(x)] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"A*f(x-1) + B*x + C"</span>
    [NeedHeroXPFormulaA] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"1"</span>
    [NeedHeroXPFormulaB] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"100"</span>
    [NeedHeroXPFormulaC] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"0"</span>
    [GrantHeroXPFormulaA] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"1"</span>
    [GrantHeroXPFormulaB] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"0"</span>
    [GrantHeroXPFormulaC] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"100"</span>
    [HeroAbilityLevelSkip] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"2"</span>
    [DropItemRange] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"100"</span>
    [GiveItemRange] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"150"</span>
    [PickupItemRange] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"150"</span>
    [PawnItemRange] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"300"</span>
    [CallForHelp] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"600"</span>
    [CreepCallForHelp] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"600"</span>
    [DefenseArmor] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"0.06"</span>
    [DamageBonusPierce] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"2.00,0.75,1.00,0.35,1.00,0.50,0.05,1.50"</span>
    [DamageBonusSiege] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"1.00,0.50,1.00,1.50,1.00,0.50,0.05,1.50"</span>
    [DamageBonusHero] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"1.00,1.00,1.00,0.50,1.00,1.00,0.05,1.00"</span>
    [EtherealDamageBonus] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"0,0,0,1.66,0,1.66,0"</span>
    [GuardDistance] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"600"</span>
    [MaxGuardDistance] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"1000"</span>
}
[Ques](<span class="hljs-number">1</span>) =&gt; <span class="hljs-built_in">table</span>: {
    [QuestIndicatorTimeout] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"10"</span>
}
[Came](<span class="hljs-number">19</span>) =&gt; <span class="hljs-built_in">table</span>: {
    [AOA] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"20"</span>
    [top] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"2"</span>
    [FarZ] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"5000,5000,5000,5000,5000,5000"</span>
    [FOV] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"20"</span>
    [SmoothMaxDist] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"1000"</span>
    [SmoothScale] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"0.80"</span>
    [NearZ] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"100,100,100,100,100,100,60"</span>
    [Rotation] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"30"</span>
    [Height] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"0,0,0,0,0,0,0"</span>
    [Distance] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"1200"</span>
    [Smoothing] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"0.00"</span>
    [SmoothBias] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"0.15"</span>
    [SmoothMinFPS] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"10"</span>
    [right] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"4"</span>
    [SmoothBeta] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"1.5"</span>
    [Forward] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"3000"</span>
    [Strafe] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"3000"</span>
    [left] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"4"</span>
    [bottom] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"2"</span>
}
[Info](<span class="hljs-number">5</span>) =&gt; <span class="hljs-built_in">table</span>: {
    [MeleeRangeMax] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"128"</span>
    [SpeedSlow] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"220"</span>
    [SpeedAverage] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"280"</span>
    [AttackAverage] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"1.5"</span>
    [AttackSlow] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"2"</span>
}
[Flye](<span class="hljs-number">2</span>) =&gt; <span class="hljs-built_in">table</span>: {
    [MaximizeRadius] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"6"</span>
    [SmoothLevels] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"3"</span>
}
[Unpa](<span class="hljs-number">4</span>) =&gt; <span class="hljs-built_in">table</span>: {
    [left] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"6"</span>
    [right] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"6"</span>
    [top] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"8"</span>
    [bottom] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"4"</span>
}
[Defa](<span class="hljs-number">5</span>) =&gt; <span class="hljs-built_in">table</span>: {
    [Style] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"0"</span>
    [Start] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"20000"</span>
    [End] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"50000"</span>
    [Density] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"0"</span>
    [Color] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"0,0,0,0"</span>
}
[Arth](<span class="hljs-number">33</span>) =&gt; <span class="hljs-built_in">table</span>: {
    [File1] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"Doodads\Cinematic\ArthasIllidanFight\ArthasCape0001.mrf"</span>
    [File21] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"Doodads\Cinematic\ArthasIllidanFight\ArthasCape0004.mrf"</span>
    [Style] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"0"</span>
    [File13] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"Doodads\Cinematic\ArthasIllidanFight\IllidanDeathShadowA.blp"</span>
    [Start] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"0"</span>
    [End] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"6000"</span>
    [Density] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"1"</span>
    [File3] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"Doodads\Cinematic\ArthasIllidanFight\ArthasCloakFight.blp"</span>
    [Color] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"255,92,112,120"</span>
    [File0] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"Sound\Ambient\DoodadEffects\FinalCinematic.mp3"</span>
    [File4] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"Doodads\Cinematic\ArthasIllidanFight\Arthas1.blp"</span>
    [File5] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"Doodads\Cinematic\ArthasIllidanFight\StoneTiledSnowTALLtrev.blp"</span>
    [File6] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"Doodads\Cinematic\ArthasIllidanFight\IllidanBlade.blp"</span>
    [File7] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"Doodads\Cinematic\ArthasIllidanFight\FrostMorne.blp"</span>
    [File8] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"Doodads\Cinematic\ArthasIllidanFight\BigAssSky.blp"</span>
    [File9] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"Doodads\Cinematic\ArthasIllidanFight\ArthasCape0000.mrf"</span>
    [File10] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"Doodads\Cinematic\ArthasIllidanFight\ArthasCape0002.mrf"</span>
    [File11] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"Doodads\Cinematic\ArthasIllidanFight\ArthasCape0003.mrf"</span>
    [File12] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"Doodads\Cinematic\ArthasIllidanFight\SpeedLines1_solid.blp"</span>
    [File14] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"Doodads\Cinematic\ArthasIllidanFight\IllidanCineStuff.blp"</span>
    [File15] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"Doodads\Cinematic\ArthasIllidanFight\IllidanCine.blp"</span>
    [File16] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"Doodads\Cinematic\ArthasIllidanFight\IceCrownWalls.blp"</span>
    [File17] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"Doodads\Cinematic\ArthasIllidanFight\IceCrownDoodads0.blp"</span>
    [File18] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"Doodads\Cinematic\ArthasIllidanFight\Ice_Natural01.blp"</span>
    [File19] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"Doodads\Cinematic\ArthasIllidanFight\Clouds8x8.blp"</span>
    [File20] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"Doodads\Cinematic\ArthasIllidanFight\Ice_Natural01.blp"</span>
    [File22] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"Doodads\Cinematic\ArthasIllidanFight\ArthasCape0005.mrf"</span>
    [File23] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"Doodads\Cinematic\ArthasIllidanFight\SacrificialAltarskull1.blp"</span>
    [File24] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"Doodads\Cinematic\ArthasIllidanFight\rockShadow.blp"</span>
    [File25] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"Doodads\Cinematic\ArthasIllidanFight\IronForgeSnow01solid1.blp"</span>
    [File26] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"Doodads\Cinematic\ArthasIllidanFight\furboots2.blp"</span>
    [File27] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"Doodads\Cinematic\ArthasIllidanFight\IllidanBlade_mip1.blp"</span>
    [Scene1] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"FinalCinematic"</span>
}
[Terr](<span class="hljs-number">9</span>) =&gt; <span class="hljs-built_in">table</span>: {
    [MaxHeight] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"1536"</span>
    [Style] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"0"</span>
    [Start] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"3000"</span>
    [End] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"5000"</span>
    [// <span class="hljs-number">0</span>] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"low ground, each cliff level = 128"</span>
    [Density] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"0.5"</span>
    [MinHeight] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"-128"</span>
    [Color] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"255,0,0,0"</span>
    [MaxSlope] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"50"</span>
}
[Menu](<span class="hljs-number">5</span>) =&gt; <span class="hljs-built_in">table</span>: {
    [Style] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"0,0"</span>
    [Start] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"100,0"</span>
    [End] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"5500,7000"</span>
    [Density] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"1,1"</span>
    [Color] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"255,11,20,11,255,178,178,204"</span>
}
[Soun](<span class="hljs-number">5</span>) =&gt; <span class="hljs-built_in">table</span>: {
    [MusicFadeInterval] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"500"</span>
    [MinDist] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"1200"</span>
    [Attenuation] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"3.0"</span>
    [MaxDist] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"20000"</span>
    [MusicFadeRate] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"16"</span>
}
[Targ](<span class="hljs-number">2</span>) =&gt; <span class="hljs-built_in">table</span>: {
    [TargetLightColor] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"180,0,255,0"</span>
    [SelTargetColor] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"255,240,200,0"</span>
}
[Ligh](<span class="hljs-number">1</span>) =&gt; <span class="hljs-built_in">table</span>: {
    [Direction] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"0.3,0.3,-0.25"</span>
}
[Sele](<span class="hljs-number">15</span>) =&gt; <span class="hljs-built_in">table</span>: {
    [NumSizes] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"3"</span>
    [TextureDotted00] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"ReplaceableTextures\Selection\SelectionCircleSmallDotted"</span>
    [ColorEnemy] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"255,255,0,0"</span>
    [Texture00] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"ReplaceableTextures\Selection\SelectionCircleSmall"</span>
    [AllyOffset] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"0.2"</span>
    [Size00] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"100"</span>
    [ColorNeutral] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"255,255,255,0"</span>
    [TextureDotted01] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"ReplaceableTextures\Selection\SelectionCircleMedDotted"</span>
    [Texture01] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"ReplaceableTextures\Selection\SelectionCircleMed"</span>
    [Size01] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"300"</span>
    [ScaleFactor] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"72"</span>
    [TextureDotted02] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"ReplaceableTextures\Selection\SelectionCircleLargeDotted"</span>
    [Texture02] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"ReplaceableTextures\Selection\SelectionCircleLarge"</span>
    [ImageWalkableZOffset] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"15"</span>
    [ColorFriend] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"255,0,255,0"</span>
}
[Blig](<span class="hljs-number">7</span>) =&gt; <span class="hljs-built_in">table</span>: {
    [DCT_s2] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"10"</span>
    [Texture] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"TerrainArt\Blight\Blight"</span>
    [DCT_d2] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"20"</span>
    [PuffModel] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"Environment\BlightDoodad\BlightDoodad.mdl"</span>
    [DCT_s1] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"5"</span>
    [DCT_sd] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"15"</span>
    [DCT_d1] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"5"</span>
}
[Wate](<span class="hljs-number">5</span>) =&gt; <span class="hljs-built_in">table</span>: {
    [DeepLevelPathing] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"52"</span>
    [MinDepth] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"10"</span>
    [DeepLevel] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"64"</span>
    [MaxDepth] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"72"</span>
    [WavesDepth] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"25"</span>
}
[Team](<span class="hljs-number">4</span>) =&gt; <span class="hljs-built_in">table</span>: {
    [ColorIndexPlayer] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"1"</span>
    [ColorIndexAlly] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"2"</span>
    [ColorIndexCreep] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"12"</span>
    [ColorIndexEnemy] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"0"</span>
}
[FogO](<span class="hljs-number">25</span>) =&gt; <span class="hljs-built_in">table</span>: {
    [BlackMaskedObject] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"255,0,0,0"</span>
    [FoggedTerrain] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"170,16,16,32"</span>
    [FoggedObject] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"255,64,64,96"</span>
    [BlackMaskedTerrain] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"255,0,0,0"</span>
    [DarkMaskedTerrain] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"230,0,0,0"</span>
    [BoundaryTerrain] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"230,0,0,0"</span>
    [FogColorCreepAllied] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"255,0,0,50"</span>
    [BoundaryObject] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"255,0,0,0"</span>
    [FoggedBoundaryTerrain] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"170,16,16,32"</span>
    [FogColorPlayer] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"255,255,255,255"</span>
    [DarkMaskedObject] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"255,32,32,48"</span>
    [FoggedBoundaryObject] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"255,64,64,96"</span>
    [ShadowImageColor] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"170,0,0,0"</span>
    [FogColorAlly] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"255,0,255,210"</span>
    [FogColorEnemy] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"255,255,0,0"</span>
    [FogColorResource] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"255,32,128,128"</span>
    [FogColorItem] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"255,240,240,0"</span>
    [FogColorHero] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"255,255,255,128"</span>
    [FogColorCreepNormal] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"255,0,0,50"</span>
    [FogColorDestructable] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"255,0,160,128"</span>
    [FogColorBlackMaskAlpha] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"0"</span>
    [FogColorDarkMaskAlpha] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"96"</span>
    [FogColorFogMaskAlpha] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"192"</span>
    [FogColorVisibleAlpha] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"255"</span>
    [FogColorBlightMask] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"0,63,63,64"</span>
}
[Mini](<span class="hljs-number">8</span>) =&gt; <span class="hljs-built_in">table</span>: {
    [MinimapToughCampColor] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"255,220,0,0"</span>
    [MinimapToughCampThreshold] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"20"</span>
    [MinimapColorBorder] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"255,60,60,70"</span>
    [MinimapMiddleCampThreshold] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"10"</span>
    [MinimapMiddleCampScale] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"1.3"</span>
    [MinimapWeakCampColor] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"255,0,200,0"</span>
    [MinimapMiddleCampColor] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"255,255,128,0"</span>
    [MinimapCampPulseScale] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"0.5"</span>
}
[Glue](<span class="hljs-number">3</span>) =&gt; <span class="hljs-built_in">table</span>: {
    [ControlFadeDuration] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"0.25"</span>
    [ControlFadeDurationDebug] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"0.01"</span>
    [CustomLoadTimerDuration] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"10.0"</span>
}
[Batt](<span class="hljs-number">3</span>) =&gt; <span class="hljs-built_in">table</span>: {
    [LargeMapRange] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"9,12"</span>
    [SmallMapRange] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"2,4"</span>
    [MediumMapRange] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"5,8"</span>
}
[Occl](<span class="hljs-number">4</span>) =&gt; <span class="hljs-built_in">table</span>: {
    [BuildingsOcclude] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"0"</span>
    [OccluderColor] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"128,255,255,255"</span>
    [MarkImage] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"ReplaceableTextures\Occlusion\OcclusionMark"</span>
    [MarkColor] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"255,255,0,255"</span>
}
[Plac](<span class="hljs-number">2</span>) =&gt; <span class="hljs-built_in">table</span>: {
    [PaidStructureColor] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"96,128,128,255"</span>
    [UnpaidStructureColor] =&gt; &lt;<span class="hljs-built_in">string</span>&gt;<span class="hljs-string">"96,255,128,128"</span>
} 
</div></code></pre>
<h2 id="sync-%E5%90%8C%E6%AD%A5">sync 同步</h2>
<blockquote>
<p>网易给我们提供的与同步数据有关的函数有4条：</p>
<p>hjapi已附带</p>
</blockquote>
<pre class="hljs"><code><div>DzSyncData
DzTriggerRegisterSyncData
DzGetTriggerSyncPlayer
DzGetTriggerSyncData
</div></code></pre>
<blockquote>
<p>原理和服务器请求响应一样，简单易懂</p>
<p>一个发，一个收（注意过程时间）</p>
</blockquote>
<h4 id="%E8%8B%A5%E4%BD%BF%E7%94%A8hsync%E5%BA%93%E4%BE%8B%E5%AD%90">若使用hsync库，例子</h4>
<pre class="hljs"><code><div><span class="hljs-comment">-- 通用型操作，两个配套</span>
hsync.onSend(<span class="hljs-string">"hzg"</span>, <span class="hljs-function"><span class="hljs-keyword">function</span><span class="hljs-params">(syncData)</span></span>
    echo(syncData.triggerData[<span class="hljs-number">1</span>] .. syncData.triggerData[<span class="hljs-number">2</span>] .. <span class="hljs-string">"人类"</span>)
<span class="hljs-keyword">end</span>)
<span class="hljs-keyword">local</span> a = <span class="hljs-number">0</span>
htime.setInterval(<span class="hljs-number">2</span>, <span class="hljs-function"><span class="hljs-keyword">function</span><span class="hljs-params">(curTimer)</span></span>
    hsync.send(<span class="hljs-string">"hzg"</span>, { <span class="hljs-string">"hunzsig"</span>, <span class="hljs-string">"是个"</span> .. a .. <span class="hljs-string">"级"</span> })
    a = a + <span class="hljs-number">1</span>
<span class="hljs-keyword">end</span>)
</div></code></pre>
<p>:<a href="">例子</a></p>
<h2 id="%E4%BD%BF%E7%94%A8%E6%8E%92%E8%A1%8C%E6%A6%9C">使用排行榜</h2>
<p>创建两种排行榜，一种木头，一种黄金；只记录玩家1、玩家2</p>
<p>并且每20秒换一种展示</p>
<pre class="hljs"><code><div>hleaderBoard.<span class="hljs-built_in">create</span>(<span class="hljs-string">'gold'</span>, <span class="hljs-string">'黄金榜'</span>, <span class="hljs-number">1</span>, <span class="hljs-function"><span class="hljs-keyword">function</span><span class="hljs-params">(leaderBoardKey)</span></span>
    <span class="hljs-built_in">print</span>(<span class="hljs-string">"leaderBoardKey"</span>, leaderBoardKey)
    <span class="hljs-keyword">return</span> {
        { playerIndex = <span class="hljs-number">1</span>, value = hplayer.getGold(hplayer.players[<span class="hljs-number">1</span>]) },
        { playerIndex = <span class="hljs-number">2</span>, value = hplayer.getGold(hplayer.players[<span class="hljs-number">2</span>]) }
    }
<span class="hljs-keyword">end</span>)
hleaderBoard.<span class="hljs-built_in">create</span>(<span class="hljs-string">'lumber'</span>, <span class="hljs-string">'木头榜'</span>, <span class="hljs-number">1</span>, <span class="hljs-function"><span class="hljs-keyword">function</span><span class="hljs-params">(leaderBoardKey)</span></span>
    <span class="hljs-built_in">print</span>(<span class="hljs-string">"leaderBoardKey"</span>, leaderBoardKey)
    <span class="hljs-keyword">return</span> {
        { playerIndex = <span class="hljs-number">1</span>, value = hplayer.getLumber(hplayer.players[<span class="hljs-number">1</span>]) },
        { playerIndex = <span class="hljs-number">2</span>, value = hplayer.getLumber(hplayer.players[<span class="hljs-number">2</span>]) }
    }
<span class="hljs-keyword">end</span>)

htime.setInterval(<span class="hljs-number">20</span>, <span class="hljs-function"><span class="hljs-keyword">function</span><span class="hljs-params">(_)</span></span>
    <span class="hljs-keyword">if</span> (hleaderBoard.CURRENT == <span class="hljs-string">'gold'</span>) <span class="hljs-keyword">then</span>
        hleaderBoard.show(<span class="hljs-string">'lumber'</span>)
    <span class="hljs-keyword">else</span>
        hleaderBoard.show(<span class="hljs-string">'gold'</span>)
    <span class="hljs-keyword">end</span>
<span class="hljs-keyword">end</span>)
</div></code></pre>
<h2 id="%E4%BD%BF%E7%94%A8%E5%A4%9A%E9%9D%A2%E6%9D%BF">使用多面板</h2>
<p>创建常见的英雄属性多面板，1.5秒更新一次数据</p>
<pre class="hljs"><code><div>hmultiBoard.<span class="hljs-built_in">create</span>(
    <span class="hljs-string">"player"</span>,
    <span class="hljs-number">1.5</span>,
    <span class="hljs-function"><span class="hljs-keyword">function</span><span class="hljs-params">(mb)</span></span>
        <span class="hljs-comment">--拼凑多面板数据，二维数组，行列模式</span>
        hmultiBoard.setTitle(mb, <span class="hljs-string">"剑圣求生多面板"</span>)
        <span class="hljs-comment">--开始当然是title了</span>
        <span class="hljs-keyword">local</span> data = {}
        <span class="hljs-built_in">table</span>.<span class="hljs-built_in">insert</span>(data, {
            { value = <span class="hljs-string">"玩家"</span>, icon = <span class="hljs-literal">nil</span> },
            { value = <span class="hljs-string">"称号"</span>, icon = <span class="hljs-literal">nil</span> },
            { value = <span class="hljs-string">"战力"</span>, icon = <span class="hljs-literal">nil</span> },
            { value = <span class="hljs-string">"杀敌"</span>, icon = <span class="hljs-literal">nil</span> },
            { value = <span class="hljs-string">"英雄"</span>, icon = <span class="hljs-literal">nil</span> },
            { value = <span class="hljs-string">"回血"</span>, icon = <span class="hljs-literal">nil</span> },
            { value = <span class="hljs-string">"回魔"</span>, icon = <span class="hljs-literal">nil</span> },
            { value = <span class="hljs-string">"攻速"</span>, icon = <span class="hljs-literal">nil</span> },
            { value = <span class="hljs-string">"命中"</span>, icon = <span class="hljs-literal">nil</span> },
            { value = <span class="hljs-string">"增幅"</span>, icon = <span class="hljs-literal">nil</span> },
            { value = <span class="hljs-string">"减伤"</span>, icon = <span class="hljs-literal">nil</span> },
            { value = <span class="hljs-string">"魔抗"</span>, icon = <span class="hljs-literal">nil</span> },
            { value = <span class="hljs-string">"回避"</span>, icon = <span class="hljs-literal">nil</span> },
            { value = <span class="hljs-string">"背包"</span>, icon = <span class="hljs-literal">nil</span> },
            { value = <span class="hljs-string">"硬直"</span>, icon = <span class="hljs-literal">nil</span> },
            { value = <span class="hljs-string">"攻击类型"</span>, icon = <span class="hljs-literal">nil</span> },
        })
        <span class="hljs-comment">--然后是form</span>
        <span class="hljs-keyword">for</span> <span class="hljs-built_in">pi</span> = <span class="hljs-number">1</span>, hplayer.qty_max, <span class="hljs-number">1</span> <span class="hljs-keyword">do</span>
            <span class="hljs-keyword">local</span> p = hplayer.players[<span class="hljs-built_in">pi</span>]
            <span class="hljs-keyword">if</span> (his.playing(p)) <span class="hljs-keyword">then</span>
                <span class="hljs-keyword">local</span> hero = <span class="hljs-string">"-"</span>
                <span class="hljs-keyword">local</span> prestige = <span class="hljs-string">"-"</span>
                <span class="hljs-keyword">local</span> power = <span class="hljs-string">"-"</span>
                <span class="hljs-keyword">local</span> kill = <span class="hljs-string">"-"</span>
                <span class="hljs-keyword">local</span> avatar = <span class="hljs-literal">nil</span>
                <span class="hljs-keyword">local</span> name = <span class="hljs-string">"-"</span>
                <span class="hljs-keyword">local</span> life_back = <span class="hljs-string">"-"</span>
                <span class="hljs-keyword">local</span> mana_back = <span class="hljs-string">"-"</span>
                <span class="hljs-keyword">local</span> attack_speed = <span class="hljs-string">"-"</span>
                <span class="hljs-keyword">local</span> damage_extent = <span class="hljs-string">"-"</span>
                <span class="hljs-keyword">local</span> aim = <span class="hljs-string">"-"</span>
                <span class="hljs-keyword">local</span> toughness = <span class="hljs-string">"-"</span>
                <span class="hljs-keyword">local</span> resistance = <span class="hljs-string">"-"</span>
                <span class="hljs-keyword">local</span> avoid = <span class="hljs-string">"-"</span>
                <span class="hljs-keyword">local</span> weight = <span class="hljs-string">"-"</span>
                <span class="hljs-keyword">local</span> punish = <span class="hljs-string">"-"</span>
                <span class="hljs-keyword">local</span> attack_damage_type = <span class="hljs-string">"-"</span>
                hero = hhero.player_heroes[<span class="hljs-built_in">pi</span>][<span class="hljs-number">1</span>]
                <span class="hljs-keyword">if</span> (hero ~= <span class="hljs-literal">nil</span>) <span class="hljs-keyword">then</span>
                    avatar = hunit.getAvatar(hero)
                    name = hunit.getName(hero)
                    prestige = hplayer.getPrestige(p)
                    power = <span class="hljs-built_in">math</span>.integerFormat(game.playerData.power[<span class="hljs-built_in">pi</span>] <span class="hljs-keyword">or</span> <span class="hljs-number">0</span>)
                    kill = <span class="hljs-built_in">math</span>.integerFormat(hplayer.getKill(p))
                    life_back = <span class="hljs-built_in">math</span>.round(hattr.get(hero, <span class="hljs-string">"life_back"</span>)) .. <span class="hljs-string">"/秒"</span>
                    mana_back = <span class="hljs-built_in">math</span>.round(hattr.get(hero, <span class="hljs-string">"mana_back"</span>)) .. <span class="hljs-string">"/秒"</span>
                    attack_speed = <span class="hljs-built_in">math</span>.round(<span class="hljs-number">100</span> + hattr.get(hero, <span class="hljs-string">"attack_speed"</span>)) .. <span class="hljs-string">"%"</span>
                    damage_extent = <span class="hljs-built_in">math</span>.round(hattr.get(hero, <span class="hljs-string">"damage_extent"</span>)) .. <span class="hljs-string">"%"</span>
                    aim = <span class="hljs-built_in">math</span>.round(hattr.get(hero, <span class="hljs-string">"aim"</span>)) .. <span class="hljs-string">"%"</span>
                    toughness = <span class="hljs-built_in">math</span>.round(hattr.get(hero, <span class="hljs-string">"toughness"</span>))
                    resistance = <span class="hljs-built_in">math</span>.round(hattr.get(hero, <span class="hljs-string">"resistance"</span>)) .. <span class="hljs-string">"%"</span>
                    avoid = <span class="hljs-built_in">math</span>.round(hattr.get(hero, <span class="hljs-string">"avoid"</span>)) .. <span class="hljs-string">"%"</span>
                    weight = <span class="hljs-built_in">math</span>.round(hattr.get(hero, <span class="hljs-string">"weight_current"</span>)) .. <span class="hljs-string">"/"</span>
                        .. <span class="hljs-built_in">math</span>.round(hattr.get(hero, <span class="hljs-string">"weight"</span>)) .. <span class="hljs-string">"Kg"</span>
                    punish = <span class="hljs-built_in">math</span>.round(hattr.get(hero, <span class="hljs-string">"punish_current"</span>)) .. <span class="hljs-string">"/"</span>
                        .. <span class="hljs-built_in">math</span>.round(hattr.get(hero, <span class="hljs-string">"punish"</span>))
                    <span class="hljs-keyword">local</span> adt = {}
                    <span class="hljs-keyword">for</span> _, v <span class="hljs-keyword">in</span> <span class="hljs-built_in">ipairs</span>(hattr.get(hero, <span class="hljs-string">"attack_damage_type"</span>)) <span class="hljs-keyword">do</span>
                        <span class="hljs-keyword">local</span> label = CONST_ATTR[v]
                        <span class="hljs-keyword">if</span> (<span class="hljs-built_in">table</span>.includes(label, adt) == <span class="hljs-literal">false</span>) <span class="hljs-keyword">then</span>
                            <span class="hljs-built_in">table</span>.<span class="hljs-built_in">insert</span>(adt, label)
                        <span class="hljs-keyword">end</span>
                    <span class="hljs-keyword">end</span>
                    attack_damage_type = <span class="hljs-built_in">string</span>.implode(<span class="hljs-string">'、'</span>, adt)
                <span class="hljs-keyword">end</span>
                <span class="hljs-built_in">table</span>.<span class="hljs-built_in">insert</span>(data, {
                    { value = <span class="hljs-string">"["</span> .. hplayer.getStatus(p) .. <span class="hljs-string">"]"</span> .. cj.GetPlayerName(p), icon = <span class="hljs-literal">nil</span> },
                    { value = prestige, icon = <span class="hljs-literal">nil</span> },
                    { value = power, icon = <span class="hljs-literal">nil</span> },
                    { value = kill, icon = <span class="hljs-literal">nil</span> },
                    { value = name, icon = avatar },
                    { value = life_back, icon = <span class="hljs-literal">nil</span> },
                    { value = mana_back, icon = <span class="hljs-literal">nil</span> },
                    { value = attack_speed, icon = <span class="hljs-literal">nil</span> },
                    { value = aim, icon = <span class="hljs-literal">nil</span> },
                    { value = damage_extent, icon = <span class="hljs-literal">nil</span> },
                    { value = toughness, icon = <span class="hljs-literal">nil</span> },
                    { value = resistance, icon = <span class="hljs-literal">nil</span> },
                    { value = avoid, icon = <span class="hljs-literal">nil</span> },
                    { value = weight, icon = <span class="hljs-literal">nil</span> },
                    { value = punish, icon = <span class="hljs-literal">nil</span> },
                    { value = attack_damage_type, icon = <span class="hljs-literal">nil</span> },
                })
            <span class="hljs-keyword">end</span>
        <span class="hljs-keyword">end</span>
        <span class="hljs-keyword">return</span> data
    <span class="hljs-keyword">end</span>
)
</div></code></pre>
<h2 id="%E9%9A%BE%E5%BA%A6%E9%80%89%E6%8B%A9%E5%AF%B9%E8%AF%9D%E6%A1%86">难度选择对话框</h2>
<p>创建一个难度选择对话框，自动挑选第一位玩家，让他选</p>
<pre class="hljs"><code><div>hdialog.<span class="hljs-built_in">create</span>(
    <span class="hljs-literal">nil</span>, <span class="hljs-comment">--自动挑选第一位玩家，让他选</span>
    {
        title = <span class="hljs-string">"选择难度"</span>,
        buttons = {
            <span class="hljs-string">"一般困难"</span>,
            <span class="hljs-string">"非常困难"</span>,
            <span class="hljs-string">"极奇困难"</span>,
            <span class="hljs-string">"破天荒难"</span>,
        }
    },
    <span class="hljs-function"><span class="hljs-keyword">function</span><span class="hljs-params">(btnIdx)</span></span>
        <span class="hljs-keyword">if</span> (btnIdx == <span class="hljs-string">"非常困难"</span>) <span class="hljs-keyword">then</span>
            <span class="hljs-comment">--搞点事情</span>
        <span class="hljs-keyword">elseif</span> (btnIdx == <span class="hljs-string">"极奇困难"</span>) <span class="hljs-keyword">then</span>
            <span class="hljs-comment">--搞点事情</span>
        <span class="hljs-keyword">elseif</span> (btnIdx == <span class="hljs-string">"破天荒难"</span>) <span class="hljs-keyword">then</span>
            <span class="hljs-comment">--搞点事情</span>
        <span class="hljs-keyword">else</span>
            <span class="hljs-comment">--搞点事情</span>
        <span class="hljs-keyword">end</span>
        echo(<span class="hljs-string">"选择了："</span> .. btnIdx)
    <span class="hljs-keyword">end</span>
)
</div></code></pre>
<p>创建一个带热键的难度选择对话框，自动挑选玩家3，让他选</p>
<pre class="hljs"><code><div>hdialog.<span class="hljs-built_in">create</span>(
    hplayer.players[<span class="hljs-number">3</span>],
    {
        title = <span class="hljs-string">"选择难度"</span>,
        buttons = {
            { value = <span class="hljs-string">"Q"</span>, label = <span class="hljs-string">"一般困难"</span> },
            { value = <span class="hljs-string">"W"</span>, label = <span class="hljs-string">"非常困难"</span> },
            { value = <span class="hljs-string">"E"</span>, label = <span class="hljs-string">"极奇困难"</span> },
            { value = <span class="hljs-string">"R"</span>, label = <span class="hljs-string">"破天荒难"</span> },
        }
    },
    <span class="hljs-function"><span class="hljs-keyword">function</span><span class="hljs-params">(btnIdx)</span></span>
        <span class="hljs-keyword">if</span> (btnIdx == <span class="hljs-string">"Q"</span>) <span class="hljs-keyword">then</span>
            <span class="hljs-comment">--搞点事情</span>
        <span class="hljs-keyword">elseif</span> (btnIdx == <span class="hljs-string">"W"</span>) <span class="hljs-keyword">then</span>
            <span class="hljs-comment">--搞点事情</span>
        <span class="hljs-keyword">elseif</span> (btnIdx == <span class="hljs-string">"E"</span>) <span class="hljs-keyword">then</span>
            <span class="hljs-comment">--搞点事情</span>
        <span class="hljs-keyword">elseif</span> (btnIdx == <span class="hljs-string">"R"</span>) <span class="hljs-keyword">then</span>
            <span class="hljs-comment">--搞点事情</span>
        <span class="hljs-keyword">end</span>
        echo(<span class="hljs-string">"选择了："</span> .. btnIdx)
    <span class="hljs-keyword">end</span>
)
</div></code></pre>
<h2 id="%E5%B8%B8%E8%A7%81%E4%B8%A4%E7%A7%8D%E9%80%89%E8%8B%B1%E9%9B%84">常见两种选英雄</h2>
<p>酒馆模式</p>
<pre class="hljs"><code><div>hhero.setBornXY(<span class="hljs-number">0</span>, <span class="hljs-number">-300</span>) <span class="hljs-comment">--设定英雄出生点</span>
hhero.buildSelector({
    during = <span class="hljs-number">60</span>,
    <span class="hljs-built_in">type</span> = <span class="hljs-string">"tavern"</span>,
    buildX = <span class="hljs-number">-512</span>, <span class="hljs-comment">-- 酒馆构建点X</span>
    buildY = <span class="hljs-number">512</span>, <span class="hljs-comment">-- 酒馆构建点Y</span>
    buildDistance = <span class="hljs-number">256</span>,<span class="hljs-comment">--酒馆间距离</span>
    buildRowQty = <span class="hljs-number">5</span>,<span class="hljs-comment">--酒馆一个横行有几个</span>
    tavernUnitQty = <span class="hljs-number">12</span> <span class="hljs-comment">--酒馆内最多有几种英雄</span>
})
</div></code></pre>
<p>双击模式</p>
<pre class="hljs"><code><div>hhero.setBornXY(<span class="hljs-number">0</span>, <span class="hljs-number">-300</span>) <span class="hljs-comment">--设定英雄出生点</span>
hhero.buildSelector({
    during = <span class="hljs-number">60</span>,
    <span class="hljs-built_in">type</span> = <span class="hljs-string">"click"</span>,
    buildX = <span class="hljs-number">-512</span>, <span class="hljs-comment">-- 第一个英雄构建点X</span>
    buildY = <span class="hljs-number">512</span>, <span class="hljs-comment">-- 第一个英雄构建点Y</span>
    buildDistance = <span class="hljs-number">256</span>,<span class="hljs-comment">--每位英雄间距离</span>
    buildRowQty = <span class="hljs-number">5</span> <span class="hljs-comment">--一个横行有几个英雄</span>
})
</div></code></pre>
<h2 id="%E7%AE%80%E5%8D%95%E5%88%B7%E5%85%B5">简单刷兵</h2>
<p>每3秒在（0,0）刷2个步兵，攻击（100,100）坐标，一共刷10次</p>
<p>步兵的初始移动速度为175</p>
<pre class="hljs"><code><div><span class="hljs-keyword">local</span> counter = <span class="hljs-number">10</span>;
htime.setInterval(<span class="hljs-number">3.00</span>, <span class="hljs-function"><span class="hljs-keyword">function</span><span class="hljs-params">(curTimer)</span></span>
    <span class="hljs-keyword">if</span> (counter &lt;= <span class="hljs-number">0</span>) <span class="hljs-keyword">then</span>
        htime.delTimer(curTimer)
    <span class="hljs-keyword">end</span>
    counter = counter - <span class="hljs-number">1</span>
    hunit.<span class="hljs-built_in">create</span>({
        whichPlayer = hplayer.players[<span class="hljs-number">1</span>], <span class="hljs-comment">--归属玩家</span>
        id = <span class="hljs-string">"hfoo"</span>, <span class="hljs-comment">--类型id,如'H001'</span>
        x = <span class="hljs-number">0</span>, <span class="hljs-comment">--创建坐标X，可选</span>
        y = <span class="hljs-number">0</span>, <span class="hljs-comment">--创建坐标Y，可选</span>
        qty = <span class="hljs-number">2</span>, <span class="hljs-comment">--数量，可选，可选</span>
        attackX = <span class="hljs-number">100</span>, <span class="hljs-comment">--攻击X，可选</span>
        attackY = <span class="hljs-number">100</span>, <span class="hljs-comment">--攻击Y，可选</span>
        attr = {  <span class="hljs-comment">--自定义属性，可选</span>
            move = <span class="hljs-string">'=175'</span>
        },
    });
<span class="hljs-keyword">end</span>)
</div></code></pre>
<p>:<a href="">其他学习</a></p>
<h2 id="jetbrain%E8%AE%BE%E7%BD%AE%E5%AD%A6%E4%B9%A0">Jetbrain设置学习</h2>
<p>安装 Emmylua 插件，如虎添翼</p>
<p><img src="https://github.com/hunzsig-warcraft3/h-lua-sdk/raw/gh-pages/img/emmylua.png" alt="Emmylua"></p>
<p>可以为 h-lua 目录设置sources，提高索引效率</p>
<p><img src="https://github.com/hunzsig-warcraft3/h-lua-sdk/raw/gh-pages/img/jetbrain1.png" alt="Sources"></p>
<p>可以为 temp 目录设置excluded，忽略其索引</p>
<p><img src="https://github.com/hunzsig-warcraft3/h-lua-sdk/raw/gh-pages/img/jetbrain2.png" alt="Excluded"></p>
<h2 id="q--a">Q &amp; A</h2>
<p>懂得问问题才能让你变得更强！</p>
<p>下列问问题方法相信可以帮助你~</p>
<p><img src="https://github.com/hunzsig-warcraft3/h-lua-sdk/raw/gh-pages/img/question1.png" alt="Emmylua"></p>
<p><img src="https://github.com/hunzsig-warcraft3/h-lua-sdk/raw/gh-pages/img/question2.png" alt="Emmylua"></p>
<h2 id="%E4%B8%8A%E7%BA%BF%E5%AE%98%E6%96%B9%E5%AF%B9%E6%88%98%E5%B9%B3%E5%8F%B0%E9%A1%BB%E7%9F%A5">上线官方对战平台须知</h2>
<blockquote>
<p>上线的地图需要在发布后台勾选上启用平台的 japi 选项，否则无法调用 lua引擎库</p>
</blockquote>
<p>1、第一步做好你的图，做不好就不用看后面了</p>
<p>2、使用sdk将项目打包,如我的项目叫h-lua-sdk-helloworld</p>
<pre class="hljs"><code><div>.\sdk.exe build h-lua-sdk-helloworld
或缩写
.\sdk.exe -b h-lua-sdk-helloworld
</div></code></pre>
<p>3、项目打包完会启动测试，此时已经在你的war3根目录的map/test目录内有了结果文件，如：</p>
<blockquote>
<p>\Warcraft3\Maps\Test\WorldEditTestMap.w3x 这个文件已经经过slk加密</p>
</blockquote>
<p>4、把优化好的地图文件改个名，例如你的地图是剑圣求生之路：jsqszl.v1.0.0.w3x,就可以上传地图到官方对战平台了！</p>
<blockquote>
<p>如果你够强还可以对脚本进行加密，由于是很简单的东西，这里不做赘述。</p>
</blockquote>
<h3 id="congratulations">CONGRATULATIONS！</h3>
<h2 id="%E9%AD%94%E5%85%BD%E4%BD%9C%E5%9B%BE%E5%B0%8F%E6%8A%80%E5%B7%A7">魔兽作图小技巧</h2>
<h3 id="%E5%A6%82%E4%BD%95%E4%BB%A4%E5%8A%A0%E8%BD%BD%E5%9C%B0%E5%9B%BE%E6%97%B6%E6%92%AD%E6%94%BE%E9%9F%B3%E4%B9%90">如何令加载地图时播放音乐</h3>
<p>随意创建一个F4触发器</p>
<p>转为自定义代码并删除里面所有代码</p>
<p>贴上以下代码即可：</p>
<blockquote>
<ul>
<li>此方法在重制版魔兽中可能是无效的</li>
</ul>
</blockquote>
<pre class="hljs"><code><div>function hBgm takes string s returns nothing
    local string uri = &quot;main.mp3&quot; //这个路径你可以播放默认的音乐（在F5）也可以播放F12导入的音乐
    call SetMapDescription(s)
    call PlayMusic(uri)
    set uri = null
endfunction
#define SetMapDescription(s) hBgm(s)
</div></code></pre>
<h3 id="%E4%B8%BA%E4%BB%80%E4%B9%88%E6%88%91%E7%9A%84mp3%E8%83%8C%E6%99%AF%E9%9F%B3%E4%B9%90%E4%B8%8D%E8%83%BD%E5%BE%AA%E7%8E%AF%E6%92%AD%E6%94%BE">为什么我的mp3背景音乐不能循环播放</h3>
<p>背景音乐无法循环播放时，可以尝试格式工厂转wav再转回mp3</p>
<p>一般问题已解决~</p>
<h3 id="%E5%A6%82%E4%BD%95%E4%BB%A4%E4%B8%80%E4%B8%AA%E6%8A%80%E8%83%BD%E9%9A%90%E8%97%8F%E4%BD%86%E6%98%AF%E4%BE%9D%E7%84%B6%E6%9C%89%E6%95%88">如何令一个技能隐藏但是依然有效</h3>
<p>设置它的图标坐标为（0,-11）</p>
<h3 id="%E7%89%A9%E5%93%81%E7%BC%96%E8%BE%91%E5%99%A8%E5%A6%82%E4%BD%95%E8%BE%93%E5%85%A5%E8%B4%9F%E6%95%B0%E7%9A%84%E6%95%B0%E5%80%BC">物品编辑器如何输入负数的数值</h3>
<p>按住shift再双击即可输入负值，某些技能负数会引起崩溃，如“水元素”</p>
<h3 id="%E5%A6%82%E4%BD%95%E4%BF%AE%E6%94%B9%E5%8D%95%E4%BD%8D%E7%9A%84%E6%9C%80%E5%A4%A7%E7%94%9F%E5%91%BD%E9%AD%94%E6%B3%95">如何修改单位的最大生命/魔法</h3>
<p>利用生命牌的bug可以实现，例如X点生命值。</p>
<p>有个叫生命护身符的物品，将它的技能设为2级，1级数据为0，2级数据为-X，将技能添加给目标单位后，设为2级，然后删除</p>
<p>目标单位会永久增加X点生命值</p>
<blockquote>
<ul>
<li>最大魔法值同理</li>
</ul>
</blockquote>
<h2 id="%E9%AD%94%E5%85%BD%E5%9C%B0%E5%BD%A2%E8%B4%B4%E5%9B%BE%E8%B7%AF%E5%BE%84%E5%A4%A7%E5%85%A8">魔兽地形贴图路径大全</h2>
<h3 id="%E7%99%BD%E6%9D%A8%E8%B0%B7">白杨谷</h3>
<pre class="hljs"><code><div>泥土：TerrainArt\Ashenvale\Ashen_Dirt.blp
坑洼的泥土：TerrainArt\Ashenvale\Ashen_DirtRough.blp
草地：TerrainArt\Ashenvale\Ashen_Grass.blp
岩石：TerrainArt\Ashenvale\Ashen_Rcok.blp
粗草地：TerrainArt\Ashenvale\Ashen_GrassLumpy.blp
藤蔓：TerrainArt\Ashenvale\Ashen_Vines.blp
草色泥土：TerrainArt\Ashenvale\Ashen_DirtGrass.blp
叶子：TerrainArt\Ashenvale\Ashen_Leaves.blp
</div></code></pre>
<h3 id="%E8%B4%AB%E7%98%A0%E4%B9%8B%E5%9C%B0">贫瘠之地</h3>
<pre class="hljs"><code><div>泥土：TerrainArt\Barrens\Barrens_Dirt.blp
坑洼的泥土：TerrainArt\Barrens\Barrens_DirtRough.blp
石子地：TerrainArt\Barrens\Barrens_Pebbles.blp
草色泥土：TerrainArt\Barrens\Barrens_DirtGrass.blp
沙漠：TerrainArt\Barrens\Barrens_Desert.blp
深色沙漠：TerrainArt\Barrens\Barrens_DesertDark.blp
岩石：TerrainArt\Barrens\Barrens_Rock.blp
草地：TerrainArt\Barrens\Barrens_Grass.blp
</div></code></pre>
<h3 id="%E5%9F%8E%E9%82%A6">城邦</h3>
<pre class="hljs"><code><div>泥土：TerrainArt\Cityscape\City_Dirt.blp
坑洼的泥土：TerrainArt\Cityscape\City_DirtRough.blp
黑色大理石：TerrainArt\Cityscape\City_BlackMarble.blp
砖：TerrainArt\Cityscape\City_BrickTiles.blp
正方形地形：TerrainArt\Cityscape\City_SquareTiles.blp
圆形地形：TerrainArt\Cityscape\City_RoundTiles.blp
草地：TerrainArt\Cityscape\City_Grass.blp
平整草地：TerrainArt\Cityscape\City_GrassTrim.blp
白色大理石：TerrainArt\Cityscape\City_WhiteMarble.blp
</div></code></pre>
<h3 id="%E8%BE%BE%E6%8B%89%E7%84%B6">达拉然</h3>
<pre class="hljs"><code><div>泥土：TerrainArt\Dalaran\Dalaran_Dirt.blp
坑洼的泥土：TerrainArt\Dalaran\Dalaran_DirtRough.blp
黑色大理石：TerrainArt\Dalaran\Dalaran_BlackMarble.blp
砖：TerrainArt\Dalaran\Dalaran_BrickTiles.blp
正方形地形：TerrainArt\Dalaran\Dalaran_SquareTiles.blp
圆形地形：TerrainArt\Dalaran\Dalaran_RoundTiles.blp
草地：TerrainArt\Dalaran\Dalaran_Grass.blp
平整的草地：TerrainArt\Dalaran\Dalaran_GrassTrim.blp
白色大理石：TerrainArt\Dalaran\Dalaran_WhiteMarble.blp
</div></code></pre>
<h3 id="%E5%9C%B0%E4%B8%8B%E5%9F%8E">地下城</h3>
<pre class="hljs"><code><div>泥土：TerrainArt\Dungeon\Cave_Dirt.blp
砖：TerrainArt\Dungeon\Cave_Brick.blp
红色石头：TerrainArt\Dungeon\Cave_RedStones.blp
熔岩碎片：TerrainArt\Dungeon\Cave_LavaCracks.blp
火山岩：TerrainArt\Dungeon\Cave_Lava.blp
深色岩石：TerrainArt\Dungeon\Cave_DarkRocks.blp
灰色的石头：TerrainArt\Dungeon\Cave_GreyStones.blp
正方形地形：TerrainArt\Dungeon\Cave_SquareTiles.blp
</div></code></pre>
<h3 id="%E6%B4%9B%E4%B8%B9%E4%BC%A6%E7%A7%8B">洛丹伦(秋)</h3>
<pre class="hljs"><code><div>泥土：TerrainArt\LordaeronFall\Lordf_Dirt.blp
坑洼的泥土：TerrainArt\LordaeronFall\Lordf_DirtRough.blp
草色泥土：TerrainArt\LordaeronFall\Lordf_DirtGrass.blp
岩石：TerrainArt\LordaeronFall\Lordf_Rock.blp
草地：TerrainArt\LordaeronFall\Lordf_Grass.blp
深色草地：TerrainArt\LordaeronFall\Lordf_GrassDark.blp
</div></code></pre>
<h3 id="%E6%B4%9B%E4%B8%B9%E4%BC%A6%E5%A4%8F">洛丹伦(夏)</h3>
<pre class="hljs"><code><div>泥土：TerrainArt\LordaeronSummer\Lords_Dirt.blp
坑洼的泥土：TerrainArt\LordaeronSummer\Lords_DirtRough.blp
草色泥土：TerrainArt\LordaeronSummer\Lords_DirtGrass.blp
岩石：TerrainArt\LordaeronSummer\Lords_Rock.blp
草地：TerrainArt\LordaeronSummer\Lords_Grass.blp
深色草地：TerrainArt\LordaeronSummer\Lords_GrassDark.blp
</div></code></pre>
<h3 id="%E6%B4%9B%E4%B8%B9%E4%BC%A6%E5%86%AC">洛丹伦(冬)</h3>
<pre class="hljs"><code><div>泥土：TerrainArt\LordaeronWinter\Lordw_Dirt.blp
坑洼的泥土：TerrainArt\LordaeronWinter\Lordw_DirtRough.blp
积雪的草：TerrainArt\LordaeronWinter\Lordw_SnowGrass.blp
岩石：TerrainArt\LordaeronWinter\Lordw_Rock.blp
草地：TerrainArt\LordaeronWinter\Lordw_Grass.blp
雪：TerrainArt\LordaeronWinter\Lordw_Snow.blp
</div></code></pre>
<h3 id="%E8%AF%BA%E6%A3%AE%E5%BE%B7">诺森德</h3>
<pre class="hljs"><code><div>泥土：TerrainArt\Northrend\North_dirt.blp
黑泥：TerrainArt\Northrend\North_dirtdark.blp
岩石：TerrainArt\Northrend\North_rock.blp
草地：TerrainArt\Northrend\North_Grass.blp
冰：TerrainArt\Northrend\North_ice.blp
雪：TerrainArt\Northrend\North_Snow.blp
积雪石头：TerrainArt\Northrend\North_SnowRock.blp
</div></code></pre>
<h3 id="%E6%9D%91%E5%BA%84">村庄</h3>
<pre class="hljs"><code><div>泥土：TerrainArt\Village\Village_Dirt.blp
坑洼的泥土：TerrainArt\Village\Village_DirtRough.blp
庄稼：TerrainArt\Village\Village_Crops.blp
鹅卵石路：TerrainArt\Village\Village_CobblePath.blp
石头路径：TerrainArt\Village\Village_StonePath.blp
草地：TerrainArt\Village\Village_GrassShort.blp
岩石：TerrainArt\Village\Village_Rocks.blp
厚草地：TerrainArt\Village\Village_GrassThick.blp
</div></code></pre>
<h3 id="%E6%9D%91%E5%BA%84%E7%A7%8B">村庄(秋)</h3>
<pre class="hljs"><code><div>泥土：TerrainArt\VillageFall\VillageFall_Dirt.blp
坑洼的泥土：TerrainArt\VillageFall\VillageFall_DirtRough.blp
庄稼：TerrainArt\VillageFall\VillageFall_Crops.blp
鹅卵石路：TerrainArt\VillageFall\VillageFall_CobblePath.blp
石头路径：TerrainArt\VillageFall\VillageFall_StonePath.blp
草地：TerrainArt\VillageFall\VillageFall_GrassShort.blp
岩石：TerrainArt\VillageFall\VillageFall_Rocks.blp
厚草地：TerrainArt\VillageFall\VillageFall_GrassThick.blp
</div></code></pre>
<h3 id="%E5%9C%B0%E5%BA%95">地底</h3>
<pre class="hljs"><code><div>泥土：TerrainArt\Dungeon2\GDirt.blp
砖：TerrainArt\Dungeon2\GBrick.blp
红色石头：TerrainArt\Dungeon2\GRedStones.blp
冰块：TerrainArt\Dungeon2\GLavaCracks.blp
冰：TerrainArt\Dungeon2\GLava.blp
深色石头：TerrainArt\Dungeon2\GDrakRocks.blp
灰色石头：TerrainArt\Dungeon2\GGreyStones.blp
正方形地形：TerrainArt\Dungeon2\GSquareTiles.blp
</div></code></pre>
<h3 id="%E8%B4%B9%E5%B0%94%E4%BC%8D%E5%BE%B7">费尔伍德</h3>
<pre class="hljs"><code><div>泥土：TerrainArt\Felwood\Felwood_Dirt.blp
坑洼的泥土：TerrainArt\Felwood\Felwood_DirtRough.blp
污染地面：TerrainArt\Felwood\Felwood_Poison.blp
岩石：TerrainArt\Felwood\Felwood_Rock.blp
藤蔓：TerrainArt\Felwood\Felwood_Vines.blp
草地：TerrainArt\Felwood\Felwood_Grass.blp
叶子：TerrainArt\Felwood\Felwood_Leaves.blp
</div></code></pre>
<h3 id="%E8%BE%BE%E6%8B%89%E7%84%B6%E9%81%97%E8%BF%B9">达拉然遗迹</h3>
<pre class="hljs"><code><div>泥土：TerrainArt\DalaranRuins\DRuins_Dirt.blp
坑洼的泥土：TerrainArt\DalaranRuins\DRuins_DirtRough.blp
黑色大理石：TerrainArt\DalaranRuins\DRuins_BlackMarble.blp
砖：TerrainArt\DalaranRuins\DRuins_BrickTiles.blp
正方形地形：TerrainArt\DalaranRuins\DRuins_SquareTiles.blp
圆形地形：TerrainArt\DalaranRuins\DRuins_RoundTiles.blp
草地：TerrainArt\DalaranRuins\DRuins_Grass.blp
平整的草地：TerrainArt\DalaranRuins\DRuins_GrassTrim.blp
白色大理石：TerrainArt\DalaranRuins\DRuins_WhiteMarble.blp
</div></code></pre>
<h3 id="%E9%BB%91%E8%89%B2%E5%9F%8E%E5%A0%A1">黑色城堡</h3>
<pre class="hljs"><code><div>泥土：TerrainArt\BlackCitadel\Citadel_Dirt.blp
淡色泥土：TerrainArt\BlackCitadel\Citadel_DirtLight.blp
坑洼的泥土：TerrainArt\BlackCitadel\Citadel_RoughDirt.blp
平石：TerrainArt\BlackCitadel\Citadel_FlatStones.blp
小砖：TerrainArt\BlackCitadel\Citadel_SmallBricks.blp
大砖：TerrainArt\BlackCitadel\Citadel_LargeBricks.blp
正方形地形：TerrainArt\BlackCitadel\Citadel_SquareTiles.blp
深色地形：TerrainArt\BlackCitadel\Citadel_DarkTiles.blp
</div></code></pre>
<h3 id="%E5%86%B0%E5%B0%81%E7%8E%8B%E5%BA%A7">冰封王座</h3>
<pre class="hljs"><code><div>泥土：TerrainArt\Icecrown\Ice_Dirt.blp
坑洼的泥土：TerrainArt\Icecrown\Ice_DirtRough.blp
黑冰：TerrainArt\Icecrown\Ice_DarkIce.blp
黑色的砖：TerrainArt\Icecrown\Ice_BlackBricks.blp
刻有北欧文字的砖：TerrainArt\Icecrown\Ice_RuneBricks.blp
平铺的砖：TerrainArt\Icecrown\Ice_TiledBricks.blp
冰：TerrainArt\Icecrown\Ice_Ice.blp
黑色的正方形：TerrainArt\Icecrown\Ice_BlackSquares.blp
雪：TerrainArt\Icecrown\Ice_Snow.blp
</div></code></pre>
<h3 id="%E8%BE%B9%E7%BC%98%E4%B9%8B%E5%9C%B0">边缘之地</h3>
<pre class="hljs"><code><div>泥土：TerrainArt\Outland\Outland_Dirt.blp
淡色泥土：TerrainArt\Outland\Outland_DirtLight.blp
坑洼的泥土：TerrainArt\Outland\Outland_RoughDirt.blp
碎土：TerrainArt\Outland\Outland_DirtCracks.blp
平石：TerrainArt\Outland\Outland_FlatStones.blp
岩石：TerrainArt\Outland\Outland_Rock.blp
淡色平石：TerrainArt\Outland\Outland_FlatStonesLight.blp
深渊：TerrainArt\Outland\Outland_Abyss.blp
</div></code></pre>
<h3 id="%E6%B2%89%E6%B2%A6%E7%9A%84%E9%81%97%E8%BF%B9">沉沦的遗迹</h3>
<pre class="hljs"><code><div>泥土：TerrainArt\Ruins\Ruins_Dirt.blp
坑洼的泥土：TerrainArt\Ruins\Ruins_DirtRough.blp
草色泥土：TerrainArt\Ruins\Ruins_DirtGrass.blp
小砖：TerrainArt\Ruins\Ruins_SmallBricks.blp
沙地：TerrainArt\Ruins\Ruins_Sand.blp
大砖：TerrainArt\Ruins\Ruins_LargeBricks.blp
圆形地形：TerrainArt\Ruins\Ruins_RoundTiles.blp
草地：TerrainArt\Ruins\Ruins_Grass.blp
深色草地：TerrainArt\Ruins\Ruins_GrassDark.blp
</div></code></pre>
<h2 id="ydwe-lua%E5%BC%95%E6%93%8E%E4%BD%BF%E7%94%A8%E8%AF%B4%E6%98%8E">ydwe lua引擎使用说明</h2>
<p><a href="https://github.com/actboy168/jass2lua/edit/master/lua-engine.md">来源 github/actboy168/jass2lua</a></p>
<h3 id="%E7%AE%80%E4%BB%8B">简介</h3>
<p>ydwe lua引擎(以下简称lua引擎)是一个嵌入到《魔兽争霸III》(以下简称魔兽)中的一个插件，它可以让魔兽可以执行lua并且调用魔兽的导出函数(在common.j内定义的函数)<br>
，就像使用jass那样。本说明假定你已经掌握了jass和lua的相关语法，有关语法的问题不再另行解释。</p>
<h3 id="%E5%85%A5%E5%8F%A3">入口</h3>
<p>在jass内调用 <code>call Cheat(&quot;exec-lua: hello&quot;)</code>，这等价于在lua里调用了 <code>require 'hello'</code> 。lua引擎已经把地图内的文件加载到搜索路径，所以地图内的hello.lua将会得到执行。</p>
<h3 id="lua%E5%BC%95%E6%93%8E%E5%AF%B9%E6%A0%87%E5%87%86lua%E7%9A%84%E4%BF%AE%E6%94%B9">lua引擎对标准lua的修改</h3>
<p>为了适合在魔兽内使用lua引擎对lua略有修改。</p>
<ol>
<li>math.randomseed改为使用jass函数SetRandomSeed实现。</li>
<li>math.random改为使用jass函数GetRandomReal实现。</li>
<li>table元素随机化种子依赖于魔兽内部的随机种子。</li>
<li>屏蔽了部分被认为不安全的函数</li>
</ol>
<h3 id="%E5%86%85%E7%BD%AE%E5%BA%93">内置库</h3>
<p>lua引擎一共有12个内置库，可以通过&quot;require '库名'&quot;调用。</p>
<ul>
<li>jass.common</li>
<li>jass.ai</li>
<li>jass.globals</li>
<li>jass.japi</li>
<li>jass.hook</li>
<li>jass.runtime</li>
<li>jass.slk</li>
<li>jass.console</li>
<li>jass.debug</li>
<li>jass.log</li>
<li>jass.message</li>
<li>jass.bignum</li>
</ul>
<h3 id="jasscommon">jass.common</h3>
<p>jass.common库包含common.j内注册的所有函数。 （不包括BJ）</p>
<pre class="hljs"><code><div>	<span class="hljs-keyword">local</span> jass = <span class="hljs-built_in">require</span> <span class="hljs-string">'jass.common'</span>
	<span class="hljs-built_in">print</span>(jass.GetHandleId(jass.Player(<span class="hljs-number">0</span>)))
</div></code></pre>
<h3 id="jassai">jass.ai</h3>
<p>jass.ai库包含common.ai内注册的所有函数。</p>
<pre class="hljs"><code><div>	<span class="hljs-keyword">local</span> jass = <span class="hljs-built_in">require</span> <span class="hljs-string">'jass.common'</span>
	<span class="hljs-keyword">local</span> ai = <span class="hljs-built_in">require</span> <span class="hljs-string">'jass.ai'</span>
	<span class="hljs-built_in">print</span>(ai.UnitAlive(jass.GetTriggerUnit()))
</div></code></pre>
<h3 id="jassglobals">jass.globals</h3>
<p>jass.globals库可以让你访问到jass内的全局变量。</p>
<blockquote>
<p>你可以使用此库访问预设在大地图的对象。</p>
</blockquote>
<pre class="hljs"><code><div>	<span class="hljs-keyword">local</span> cg = <span class="hljs-built_in">require</span> <span class="hljs-string">'jass.globals'</span>
    <span class="hljs-built_in">print</span>(cg.udg_i) <span class="hljs-comment">--获取jass中定义的i整数</span>
</div></code></pre>
<h3 id="jassjapi">jass.japi</h3>
<p>jass.japi库当前已经注册的所有japi函数。（包含dz函数）</p>
<pre class="hljs"><code><div>	<span class="hljs-keyword">local</span> jass = <span class="hljs-built_in">require</span> <span class="hljs-string">'jass.common'</span>
	<span class="hljs-keyword">local</span> japi = <span class="hljs-built_in">require</span> <span class="hljs-string">'jass.japi'</span>
	japi.EXDisplayChat(jass.Player(<span class="hljs-number">0</span>), <span class="hljs-number">0</span>, <span class="hljs-string">"Hello!"</span>)
</div></code></pre>
<p>japi函数不同环境下可能会略有不同，你可以通过pairs遍历当前的所有japi函数</p>
<pre class="hljs"><code><div>	<span class="hljs-keyword">for</span> k, v <span class="hljs-keyword">in</span> <span class="hljs-built_in">pairs</span>(<span class="hljs-built_in">require</span> <span class="hljs-string">'jass.japi'</span>) <span class="hljs-keyword">do</span>
		<span class="hljs-built_in">print</span>(k, v)
	<span class="hljs-keyword">end</span>
</div></code></pre>
<h3 id="jasshook">jass.hook</h3>
<p>jass.hook库可以对common.j内注册的函数下钩子。注：jass.common库不会受到影响。</p>
<p>同时，为了避免jass和lua之间传递浮点数时产生误差，通过jass.hook传递到lua中的浮点数，并不是number类型，而是userdata。当你需要<strong>精确</strong>地操纵浮点数时，也请注意这点。</p>
<pre class="hljs"><code><div>	<span class="hljs-keyword">local</span> hook = <span class="hljs-built_in">require</span> <span class="hljs-string">'jass.hook'</span>
	<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">hook.CreateUnit</span><span class="hljs-params">(pid, uid, x, y, face, realCreateUnit)</span></span>
		<span class="hljs-comment">-- 当jass内调用CreateUnit时，就会被执行</span>
		<span class="hljs-built_in">print</span>(<span class="hljs-string">'CreateUnit'</span>)
		<span class="hljs-built_in">print</span>(<span class="hljs-built_in">type</span>(x))
		<span class="hljs-keyword">return</span> realCreateUnit(pid, uid, x, y, face)
	<span class="hljs-keyword">end</span>
</div></code></pre>
<h3 id="jassslk">jass.slk</h3>
<p>jass.slk库可以在地图运行时读取地图内的slk/w3*文件。</p>
<pre class="hljs"><code><div>	<span class="hljs-keyword">local</span> slk = <span class="hljs-built_in">require</span> <span class="hljs-string">'jass.slk'</span>
	<span class="hljs-built_in">print</span>(slk.ability.AHbz.Name)
</div></code></pre>
<p>你也可以遍历一个表或者一个物体（不建议方式）</p>
<pre class="hljs"><code><div>	<span class="hljs-keyword">local</span> slk = <span class="hljs-built_in">require</span> <span class="hljs-string">'jass.slk'</span>
	<span class="hljs-keyword">for</span> k, v <span class="hljs-keyword">in</span> <span class="hljs-built_in">pairs</span>(slk.ability) <span class="hljs-keyword">do</span>
		<span class="hljs-built_in">print</span>(k, v)
	<span class="hljs-keyword">end</span>
	<span class="hljs-keyword">for</span> k, v <span class="hljs-keyword">in</span> <span class="hljs-built_in">pairs</span>(slk.ability.AHbz) <span class="hljs-keyword">do</span>
		<span class="hljs-built_in">print</span>(k, v)
	<span class="hljs-keyword">end</span>
</div></code></pre>
<p>slk包含</p>
<ul>
<li>unit</li>
<li>item</li>
<li>destructable</li>
<li>doodad</li>
<li>ability</li>
<li>buff</li>
<li>upgrade</li>
<li>misc</li>
</ul>
<p>与你物体编辑器中的项目一一对应。</p>
<p>获取数据时使用的索引你可以在物体编辑器中通过Ctrl+D来查询到</p>
<p>注意，当访问正确时返回值永远是字符串。如果你获取的是某个单位的生命值，你可能需要使用tonumber来进行转换。当访问不正确时将返回nil。</p>
<h3 id="jassruntime">jass.runtime</h3>
<h4 id="jassruntime%E5%BA%93%E5%8F%AF%E4%BB%A5%E5%9C%A8%E5%9C%B0%E5%9B%BE%E8%BF%90%E8%A1%8C%E6%97%B6%E8%8E%B7%E5%8F%96lua%E5%BC%95%E6%93%8E%E7%9A%84%E4%BF%A1%E6%81%AF%E6%88%96%E4%BF%AE%E6%94%B9lua%E5%BC%95%E6%93%8E%E7%9A%84%E9%83%A8%E5%88%86%E9%85%8D%E7%BD%AE">jass.runtime库可以在地图运行时获取lua引擎的信息或修改lua引擎的部分配置。</h4>
<pre class="hljs"><code><div>	<span class="hljs-keyword">local</span> runtime = <span class="hljs-built_in">require</span> <span class="hljs-string">'jass.runtime'</span>
</div></code></pre>
<h5 id="runtimeconsole%E9%BB%98%E8%AE%A4%E4%B8%BAfalse">runtime.console(默认为false)</h5>
<p>赋值为true后会打开一个cmd窗口，print与console.write函数可以输出到这里</p>
<pre class="hljs"><code><div>	runtime.console = <span class="hljs-literal">true</span>
</div></code></pre>
<h5 id="runtimeversion">runtime.version</h5>
<p>返回当前lua引擎的版本号</p>
<pre class="hljs"><code><div>	<span class="hljs-built_in">print</span>(runtime.version)
</div></code></pre>
<h5 id="runtimeerrorhandle">runtime.error_handle</h5>
<p>当你的lua脚本出现错误时将会调用此函数。</p>
<p>runtime.error_handle有一个默认值，等价于以下函数</p>
<pre class="hljs"><code><div>	runtime.error_handle = <span class="hljs-function"><span class="hljs-keyword">function</span><span class="hljs-params">(msg)</span></span>
		<span class="hljs-built_in">print</span>(<span class="hljs-string">"Error: "</span>, msg, <span class="hljs-string">"\n"</span>)
	<span class="hljs-keyword">end</span>
</div></code></pre>
<p>你也可以让它输出更多的信息，比如输出错误时的调用栈</p>
<pre class="hljs"><code><div>	runtime.error_handle = <span class="hljs-function"><span class="hljs-keyword">function</span><span class="hljs-params">(msg)</span></span>
		<span class="hljs-built_in">print</span>(<span class="hljs-string">"---------------------------------------"</span>)
		<span class="hljs-built_in">print</span>(<span class="hljs-string">"              LUA ERROR!!              "</span>)
		<span class="hljs-built_in">print</span>(<span class="hljs-string">"---------------------------------------"</span>)
		<span class="hljs-built_in">print</span>(<span class="hljs-built_in">tostring</span>(msg) .. <span class="hljs-string">"\n"</span>)
		<span class="hljs-built_in">print</span>(<span class="hljs-built_in">debug</span>.<span class="hljs-built_in">traceback</span>())
		<span class="hljs-built_in">print</span>(<span class="hljs-string">"---------------------------------------"</span>)
	<span class="hljs-keyword">end</span>
</div></code></pre>
<p>注意，注册此函数后lua脚本的效率会降低(即使并没有发生错误)。</p>
<h5 id="runtimehandlelevel%E9%BB%98%E8%AE%A4%E4%B8%BA0">runtime.handle_level(默认为0)</h5>
<p>lua引擎处理的handle的安全等级，有效值为0~2，注，等级越高，效率越低，安全性越高、</p>
<h6 id="0-handle%E7%9B%B4%E6%8E%A5%E4%BD%BF%E7%94%A8numberjass%E6%97%A0%E6%B3%95%E4%BA%86%E8%A7%A3%E4%BD%A0%E5%9C%A8lua%E4%B8%AD%E5%AF%B9%E8%BF%99%E4%B8%AAhandle%E7%9A%84%E5%BC%95%E7%94%A8%E6%83%85%E5%86%B5%E4%B9%9F%E4%B8%8D%E4%BC%9A%E9%80%9A%E8%BF%87%E5%A2%9E%E5%8A%A0%E5%BC%95%E7%94%A8%E8%AE%A1%E6%95%B0%E6%9D%A5%E4%BF%9D%E6%8A%A4%E8%BF%99%E4%B8%AAhandle">0: handle直接使用number，jass无法了解你在lua中对这个handle的引用情况，也不会通过增加引用计数来保护这个handle</h6>
<pre class="hljs"><code><div>	<span class="hljs-keyword">local</span> t = jass.CreateTimer()
	<span class="hljs-built_in">print</span>(t) <span class="hljs-comment">-- 1048000</span>
	<span class="hljs-built_in">type</span>(t) <span class="hljs-comment">-- "number"</span>
</div></code></pre>
<h6 id="1-handle%E5%B0%81%E8%A3%85%E5%9C%A8lightuserdata%E4%B8%AD%E4%BF%9D%E8%AF%81handle%E4%B8%8D%E8%83%BD%E5%92%8C%E6%95%B4%E6%95%B0%E7%9B%B8%E4%BA%92%E8%BD%AC%E6%8D%A2%E5%90%8C%E6%A0%B7%E4%B8%8D%E6%94%AF%E6%8C%81%E5%BC%95%E7%94%A8%E8%AE%A1%E6%95%B0">1: handle封装在lightuserdata中，保证handle不能和整数相互转换，同样不支持引用计数</h6>
<pre class="hljs"><code><div>	<span class="hljs-keyword">local</span> t = jass.CreateTimer()
	<span class="hljs-built_in">print</span>(t) <span class="hljs-comment">-- "handle: 0x10005D"</span>
	<span class="hljs-built_in">type</span>(t) <span class="hljs-comment">-- "userdata"</span>
	jass.TimerStart(t, <span class="hljs-number">1</span>, <span class="hljs-literal">false</span>, <span class="hljs-number">0</span>) <span class="hljs-comment">-- ok</span>
</div></code></pre>
<pre class="hljs"><code><div>	<span class="hljs-keyword">local</span> t = jass.CreateTimer()
	<span class="hljs-keyword">local</span> h1 = jass.CreateTimer()
	jass.DestroyTimer(h1)
	jass.TimerStart(t, <span class="hljs-number">1</span>, <span class="hljs-literal">false</span>,
		<span class="hljs-function"><span class="hljs-keyword">function</span><span class="hljs-params">()</span></span>
			<span class="hljs-keyword">local</span> h2 = jass.CreateTimer()
			<span class="hljs-built_in">print</span>(h1) <span class="hljs-comment">-- "handle: 0x10005E"</span>
			<span class="hljs-built_in">print</span>(h2) <span class="hljs-comment">-- "handle: 0x10005E"</span>
		<span class="hljs-keyword">end</span>
	)
</div></code></pre>
<h6 id="2-handle%E5%B0%81%E8%A3%85%E5%9C%A8userdata%E4%B8%ADlua%E6%8C%81%E6%9C%89%E8%AF%A5handle%E6%97%B6%E5%B0%86%E5%A2%9E%E5%8A%A0handle%E7%9A%84%E5%BC%95%E7%94%A8%E8%AE%A1%E6%95%B0lua%E9%87%8A%E6%94%BEhandle%E6%97%B6%E4%BC%9A%E9%87%8A%E6%94%BEhandle%E7%9A%84%E5%BC%95%E7%94%A8%E8%AE%A1%E6%95%B0">2: handle封装在userdata中，lua持有该handle时将增加handle的引用计数。lua释放handle时会释放handle的引用计数。</h6>
<pre class="hljs"><code><div>	<span class="hljs-keyword">local</span> t = jass.CreateTimer()
	<span class="hljs-keyword">local</span> h1 = jass.CreateTimer()
	jass.DestroyTimer(h1)
	jass.TimerStart(t, <span class="hljs-number">1</span>, <span class="hljs-literal">false</span>,
		<span class="hljs-function"><span class="hljs-keyword">function</span><span class="hljs-params">()</span></span>
			<span class="hljs-keyword">local</span> h2 = jass.CreateTimer()
			<span class="hljs-built_in">print</span>(h1) <span class="hljs-comment">-- "handle: 0x10005E"</span>
			<span class="hljs-built_in">print</span>(h2) <span class="hljs-comment">-- "handle: 0x10005F"</span>
		<span class="hljs-keyword">end</span>
	)
</div></code></pre>
<h5 id="runtimesleep%E9%BB%98%E8%AE%A4%E4%B8%BAfalse">runtime.sleep(默认为false)</h5>
<p>common.j中包含sleep操作的函数有4个，TriggerSleepAction/TriggerSyncReady/TriggerWaitForSound/SyncSelections。当此项为false时，lua引擎会忽略这4个函数的调用，并给予运行时警告。当此项为true时，这4个函数将会得到正确的执行。</p>
<p>但请注意此项为true时将降低lua引擎的运行效率，即使你没有使用这4个函数。</p>
<pre class="hljs"><code><div>	<span class="hljs-keyword">local</span> trg = jass.CreateTrigger()
	<span class="hljs-keyword">local</span> a = <span class="hljs-number">1</span>
	jass.TriggerAddAction(trg, <span class="hljs-function"><span class="hljs-keyword">function</span><span class="hljs-params">()</span></span>
		jass.TriggerSleepAction(<span class="hljs-number">0.2</span>)
		<span class="hljs-built_in">print</span>(a) <span class="hljs-comment">-- 2</span>
	<span class="hljs-keyword">end</span>)
	jass.TriggerExecute(trg)
	a = <span class="hljs-number">2</span>
</div></code></pre>
<h5 id="runtimecatchcrash%E9%BB%98%E8%AE%A4%E4%B8%BAtrue">runtime.catch_crash(默认为true)</h5>
<p>调用jass.xxx/japi.xxx发生崩溃时，会生产一个lua错误，并忽略这个崩溃。你可以注册jass.runtime.error_handle来获得这个错误。注：开启此项会略微增加运行时消耗（即使没有发生错误）。</p>
<h5 id="runtimedebugger">runtime.debugger</h5>
<p>启动调试器并监听指定端口。需要使用<code>VSCode</code>并安装<a href="https://marketplace.visualstudio.com/items?itemName=actboy168.lua-debug">Lua Debug</a>。</p>
<pre class="hljs"><code><div>	runtime.debugger = <span class="hljs-number">4279</span>
</div></code></pre>
<h3 id="jassconsole">jass.console</h3>
<h4 id="jassconsole%E4%B8%8E%E6%8E%A7%E5%88%B6%E5%8F%B0%E7%9B%B8%E5%85%B3">jass.console与控制台相关</h4>
<h5 id="consoleenable%E9%BB%98%E8%AE%A4%E4%B8%BAfalse">console.enable(默认为false)</h5>
<p>赋值为true后会打开一个cmd窗口，print与console.write函数可以输出到这里</p>
<pre class="hljs"><code><div>	console.enable = <span class="hljs-literal">true</span>
</div></code></pre>
<h5 id="consolewrite">console.write</h5>
<p>将utf8编码的字符串转化为ansi编码后输出到cmd窗口中，如果你需要输出魔兽中的中文，请使用该函数而不是print</p>
<h5 id="consoleread">console.read</h5>
<p>将控制台中的输入传入魔兽中(会自动转换编码)</p>
<p>首次调用console.read后将允许用户在控制台输入，输入完成后按回车键提交输入。</p>
<p>用户提交完成后，传入一个函数f来调用console.read，将会调用函数f，并将用户的输入作为参数传入(已转换为utf8编码)。</p>
<p>推荐的做法是每0.1秒运行一次console.read，见下面的例子：</p>
<pre class="hljs"><code><div>	<span class="hljs-keyword">local</span> jass    = <span class="hljs-built_in">require</span> <span class="hljs-string">'jass.common'</span>
	<span class="hljs-keyword">local</span> console = <span class="hljs-built_in">require</span> <span class="hljs-string">'jass.console'</span>

	console.<span class="hljs-built_in">write</span>(<span class="hljs-string">'测试开始...'</span>)

	<span class="hljs-comment">--开启计时器,每0.1秒检查输入</span>
	jass.TimerStart(jass.CreateTimer(), <span class="hljs-number">0.1</span>, <span class="hljs-literal">true</span>,
		<span class="hljs-function"><span class="hljs-keyword">function</span><span class="hljs-params">()</span></span>

			<span class="hljs-comment">--检查CMD窗口中的用户输入,如果用户有提交了的输入,则回调函数(按回车键提交输入).否则不做任何动作</span>
			console.<span class="hljs-built_in">read</span>(
				<span class="hljs-function"><span class="hljs-keyword">function</span><span class="hljs-params">(str)</span></span>
					<span class="hljs-comment">--参数即为用户的输入.需要注意的是这个函数调用是不同步的(毕竟其他玩家不知道你输入了什么)</span>
					jass.DisplayTimedTextToPlayer(jass.Player(<span class="hljs-number">0</span>), <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">60</span>, <span class="hljs-string">'你在控制台中输入了:'</span> .. str)
				<span class="hljs-keyword">end</span>
			)
		<span class="hljs-keyword">end</span>
	)
</div></code></pre>
<p>需要注意的是控制台输入是不同步的。</p>
<h3 id="jassdebug">jass.debug</h3>
<p>jass.debug库能帮助你更深入地剖析lua引擎的内部机制。</p>
<ul>
<li>functiondef jass.common或者jass.japi函数的定义</li>
</ul>
<pre class="hljs"><code><div>	<span class="hljs-keyword">local</span> jass = <span class="hljs-built_in">require</span> <span class="hljs-string">'jass.common'</span>
	<span class="hljs-keyword">local</span> dbg = <span class="hljs-built_in">require</span> <span class="hljs-string">'jass.debug'</span>
	<span class="hljs-built_in">print</span>(<span class="hljs-built_in">table</span>.<span class="hljs-built_in">unpack</span>(dbg.functiondef(jass.GetUnitX)))
</div></code></pre>
<ul>
<li>
<p>globaldef jass.globals内值的定义</p>
</li>
<li>
<p>handledef handle对应对象的内部定义</p>
</li>
<li>
<p>currentpos 当前jass执行到的位置</p>
</li>
<li>
<p>handlemax jass虚拟机当前最大的handle</p>
</li>
<li>
<p>handlecount jass虚拟机当前的handle数</p>
</li>
<li>
<p>h2i/i2h handle和integer的转换，当你runtime.handle_level不是0时，你可能会需要它</p>
</li>
<li>
<p>handle_ref 增加handle的引用</p>
</li>
<li>
<p>handle_unref 减少handle的引用</p>
</li>
<li>
<p><s>gchash</s>（已废弃） 指定一张table的gchash，gchash会决定了在其他table中这个table的排序次序<br>
在默认的情况下，lua对table的排序次序是由随机数决定的，不同玩家的lua生成的随机数不一致，所以下面的代码在不同的玩家上执行的次序是不一致的，这可能会引起不同步掉线</p>
</li>
</ul>
<h3 id="jasslog">jass.log</h3>
<p>日志库</p>
<ul>
<li>path 日志的输出路径</li>
<li>level 日志的等级，指定等级以上的日志才会输出</li>
<li>日志有6个等级 trace、debug、info、warn、error、fatal</li>
</ul>
<pre class="hljs"><code><div>	<span class="hljs-keyword">local</span> <span class="hljs-built_in">log</span> = <span class="hljs-built_in">require</span> <span class="hljs-string">'jass.log'</span>
	<span class="hljs-built_in">log</span>.info(<span class="hljs-string">'这是一行日志'</span>)
	<span class="hljs-built_in">log</span>.<span class="hljs-built_in">error</span>(<span class="hljs-string">'这是一行'</span>, <span class="hljs-string">'日志'</span>)
</div></code></pre>
<h3 id="jassmessage">jass.message</h3>
<ul>
<li>keyboard 一张表，魔兽的键盘码</li>
<li>mouse 本地玩家的鼠标坐标(游戏坐标)</li>
<li>button 本地玩家技能按钮的状态</li>
<li>hook 魔兽的消息回调，可以获得部分鼠标和键盘消息</li>
<li>selection 获得本地玩家当前选中单位</li>
<li>order_immediate 发布本地命令，无目标</li>
<li>order_point 发布本地命令，点目标</li>
<li>order_target 发布本地命令，单位目标</li>
<li>order_enable_debug 开启后，会在控制台打印当前的本地命令，调试用</li>
</ul>
<h3 id="jassbignum">jass.bignum</h3>
<p>大数库</p>
<h2 id="ui-%E4%B8%8E-fdf">UI 与 FDF</h2>
<h3 id="ui%E5%88%B6%E4%BD%9C%E5%B0%B1%E6%98%AF%E8%BF%90%E7%94%A8%E7%95%8C%E9%9D%A2%E5%87%BD%E6%95%B0%E5%AF%B9%E5%8E%9F%E6%9C%89%E7%95%8C%E9%9D%A2%E8%BF%9B%E8%A1%8C%E5%A2%9E%E5%88%A0%E6%9F%A5%E6%94%B9%E7%9A%84%E7%BE%8E%E5%8C%96">UI制作就是运用界面函数对原有界面进行增删查改的美化</h3>
<h4 id="fdf%E5%B0%B1%E6%98%AF%E4%B8%80%E7%A7%8D%E6%A0%BC%E5%BC%8F%E8%AE%A9%E4%BD%A0%E5%8F%AF%E4%BB%A5%E7%BC%96%E5%86%99%E4%B8%80%E4%BA%9Bframe%E9%9D%99%E6%80%81%E7%BB%84%E4%BB%B6%E5%A3%B0%E6%98%8E%E7%94%A8%E5%A4%84%E4%B8%8D%E5%A4%A7">FDF就是一种格式，让你可以编写一些frame静态组件声明，用处不大</h4>
<h4 id="%E8%87%B3%E4%BA%8E%E4%B8%BA%E4%BB%80%E4%B9%88%E8%AF%B4%E7%94%A8%E5%A4%84%E4%B8%8D%E5%A4%A7%E8%BF%99%E9%87%8C%E5%B0%B1%E7%95%99%E7%BB%99%E6%82%A8%E8%87%AA%E8%A1%8C%E6%80%9D%E8%80%83%E4%BA%86">至于为什么说用处不大，这里就留给您自行思考了</h4>
<p>下面是一些网上的教程，虽然不咋的，反正看看也好</p>
<blockquote>
<p><a target="_blank" href="https://blog.csdn.net/CarlosX/article/details/89161467">[War3]Fdf文件详解，简单的UI教程演示 - 魔兽争霸3</a></p>
<p><a target="_blank" href="https://www.hiveworkshop.com/threads/ui-list-default-mainframes.317884">魔兽默认组件对照</a></p>
<p><a target="_blank" href="http://bbs.dz.blizzard.cn/forum.php?mod=viewthread&tid=8038&extra=page%3D1%26filter%3Dtypeid%26typeid%3D18">[老CK教程]官方平台界面功能入门</a></p>
</blockquote>
<p>教程看完了吗？为什么说不咋的，因为其实这些教程不过是给你写一些FDF罢了，就是入个门，看个印象</p>
<p>如果你想看FDF，魔兽客户端自带就有一大堆暴雪写好的，完全不需要看他教程，暴雪写的更全更多</p>
<blockquote>
<p>已经提取了原生的fdf，有兴趣可自行查看</p>
<p>可参考提取项目：<a target="_blank" href="https://github.com/hunzsig-warcraft3/FrameDef">FrameDef</a></p>
</blockquote>
<pre class="hljs"><code><div>    UI\FrameDef\GlobalStrings.fdf
    UI\FrameDef\InfoPanelStrings.fdf
    UI\FrameDef\NetworkStrings.fdf
    UI\FrameDef\DateStrings.fdf
    UI\FrameDef\Glue\DialogWar3.fdf
    UI\FrameDef\Glue\MapInfoPane.fdf
    UI\FrameDef\Glue\AdvancedOptionsDisplay.fdf
    UI\FrameDef\Glue\AdvancedOptionsPane.fdf
    UI\FrameDef\Glue\ListBoxWar3.fdf
    UI\FrameDef\Glue\MapListBox.fdf
    UI\FrameDef\Glue\DecoratedMapListBox.fdf
    UI\FrameDef\Glue\MapPreferenceBox.fdf
    UI\FrameDef\Glue\CheckListBox.fdf
    UI\FrameDef\Glue\MainMenu.fdf
    UI\FrameDef\Glue\Loading.fdf
    UI\FrameDef\Glue\LoadSavedGameScreen.fdf
    UI\FrameDef\Glue\OptionsMenu.fdf
    UI\FrameDef\Glue\SinglePlayerMenu.fdf
    UI\FrameDef\Glue\ViewReplayScreen.fdf
    UI\FrameDef\Glue\CustomCampaignMenu.fdf
    UI\FrameDef\Glue\CampaignMenu.fdf
    UI\FrameDef\Glue\TeamSetup.fdf
    UI\FrameDef\Glue\PlayerSlot.fdf
    UI\FrameDef\Glue\Skirmish.fdf
    UI\FrameDef\Glue\ScoreScreen.fdf
    UI\FrameDef\Glue\LocalMultiplayerJoin.fdf
    UI\FrameDef\Glue\LocalMultiplayerCreate.fdf
    UI\FrameDef\Glue\LocalMultiplayerLoad.fdf
    UI\FrameDef\Glue\GameChatroom.fdf
    UI\FrameDef\Glue\CampaignListBox.fdf
    UI\FrameDef\Glue\BattleNetMain.fdf
    UI\FrameDef\Glue\BattleNetNewsBox.fdf
    UI\FrameDef\Glue\BattleNetUserListBox.fdf
    UI\FrameDef\Glue\BattleNetChatPanel.fdf
    UI\FrameDef\Glue\BattleNetChatActionMenu.fdf
    UI\FrameDef\Glue\BattleNetStandardPanel.fdf
    UI\FrameDef\Glue\BattleNetTeamPanel.fdf
    UI\FrameDef\Glue\BattleNetTeamInvitation.fdf
    UI\FrameDef\Glue\BattleNetProfilePanel.fdf
    UI\FrameDef\Glue\BattleNetCustomJoinPanel.fdf
    UI\FrameDef\Glue\BattleNetCustomCreatePanel.fdf
    UI\FrameDef\Glue\BattleNetCustomLoadPanel.fdf
    UI\FrameDef\Glue\BattleNetScheduledGame.fdf
    UI\FrameDef\Glue\BattleNetChatroom.fdf
    UI\FrameDef\Glue\BattleNetFriendsListBox.fdf
    UI\FrameDef\Glue\BattleNetFriendsPane.fdf
    UI\FrameDef\Glue\BattleNetClanMateListBox.fdf
    UI\FrameDef\Glue\BattleNetClanPane.fdf
    UI\FrameDef\Glue\BattleNetClanInvitation.fdf
    UI\FrameDef\Glue\BattleNetStatusBox.fdf
    UI\FrameDef\Glue\BattleNetIconSelectBox.fdf
    UI\FrameDef\UI\ConsoleUI.fdf
    UI\FrameDef\UI\AllianceSlot.fdf
    UI\FrameDef\UI\AllianceDialog.fdf
    UI\FrameDef\UI\ChatDialog.fdf
    UI\FrameDef\UI\LogDialog.fdf
    UI\FrameDef\UI\EscMenuMainPanel.fdf
    UI\FrameDef\UI\EscMenuOptionsPanel.fdf
    UI\FrameDef\UI\EscMenuSaveGamePanel.fdf
    UI\FrameDef\UI\GameResultDialog.fdf
    UI\FrameDef\UI\UpperButtonBar.fdf
    UI\FrameDef\UI\ResourceBar.fdf
    UI\FrameDef\UI\SimpleInfoPanel.fdf
    UI\FrameDef\UI\SuspendDialog.fdf
    UI\FrameDef\UI\UnresponsiveDialog.fdf
    UI\FrameDef\UI\ReplayPanel.fdf
    UI\FrameDef\UI\QuestDialog.fdf
    UI\FrameDef\UI\TimerDialog.fdf
    UI\FrameDef\UI\Leaderboard.fdf
    UI\FrameDef\UI\Multiboard.fdf
    UI\FrameDef\UI\CinematicPanel.fdf
    UI\FrameDef\UI\ScriptDialog.fdf
    UI\FrameDef\UI\GameSaveSplashDialog.fdf`
</div></code></pre>
<p>:<a href="">小小专栏</a></p>
<h2 id="%E5%B0%8F%E5%B0%8F%E6%BC%94%E7%A4%BA">小小演示</h2>
<h3 id="h-lua-sdk%E5%9F%BA%E7%A1%80%E6%8C%87%E4%BB%A4%E4%BB%8B%E7%BB%8D">h-lua-sdk基础指令介绍</h3>
<p>B站演示</p>
<blockquote>
<p><a target="_blank" href="https://www.bilibili.com/video/BV1nV411J7FB">魔兽争霸h-lua-sdk基础指令介绍</a></p>
</blockquote>
<p>命令行</p>
<pre class="hljs"><code><div>必填 ~ 选填
  ./h-lua-sdk&gt; sdk.exe help  //提示cmd工具命令
  ./h-lua-sdk&gt; sdk.exe new [*PROJECT_NAME]  //新建一个地图项目
  ./h-lua-sdk&gt; sdk.exe we [*PROJECT_NAME]  //以YDWE打开地图项目
  ./h-lua-sdk&gt; sdk.exe model [*PROJECT_NAME] [~PAGE:0|~search:'']  //以WE浏览项目模型，一页最大289个，可翻页可搜索
  ./h-lua-sdk&gt; sdk.exe clear [*PROJECT_NAME]  //清理构建的临时文件
  ./h-lua-sdk&gt; sdk.exe test [*PROJECT_NAME]  //构建测试版本并开启游戏进行调试
  ./h-lua-sdk&gt; sdk.exe build [*PROJECT_NAME]  //构建上线版本并开启游戏进行调试
</div></code></pre>
<p>模型命令拓展</p>
<pre class="hljs"><code><div>./h-lua-sdk&gt; sdk.exe model demo //查看项目demo的模型，默认第0页
./h-lua-sdk&gt; sdk.exe model demo 2 //查看项目demo的模型，第2页
./h-lua-sdk&gt; sdk.exe model demo ttg //查看项目demo的模型，只要路径带有ttg的
./h-lua-sdk&gt; sdk.exe model demo abc 1  //查看项目demo的模型，第1页且只要路径带有abc的
</div></code></pre>
<h2 id="%E5%B0%8F%E5%B0%8F%E6%BC%94%E7%A4%BA">小小演示</h2>
<h3 id="hslk%E9%AB%98%E7%BA%A7%E7%94%A8%E6%B3%95%E6%BC%94%E7%A4%BA1">hslk高级用法演示1</h3>
<p>B站演示</p>
<blockquote>
<p><a target="_blank" href="https://www.bilibili.com/video/BV1TK4y1Z7eB">魔兽争霸hslk高级用法演示1</a></p>
</blockquote>
<p>物品主动技能绑定</p>
<p>_onItemUsed</p>
<pre class="hljs"><code><div>hslk_item({
    Name = <span class="hljs-string">"物理学圣剑"</span>,
    class = <span class="hljs-string">"Permanent"</span>,
    _cooldown = <span class="hljs-number">1</span>,
    _cooldownTarget = CONST_ABILITY_TARGET.location.value,
    _attr = _attr({
        attack_green = <span class="hljs-string">"+9999"</span>
    }),
    _onItemUsed = _onItemUsed(<span class="hljs-function"><span class="hljs-keyword">function</span><span class="hljs-params">(evtData)</span></span>
        hunit.portal(evtData.triggerUnit,evtData.targetX,evtData.targetY)
    <span class="hljs-keyword">end</span>)
})
</div></code></pre>
<p>技能主动绑定</p>
<p>_onSkillEffect</p>
<pre class="hljs"><code><div>hslk_ability({
    Name = <span class="hljs-string">"穿云箭"</span>,
    Art = <span class="hljs-string">"ReplaceableTextures\\CommandButtons\\BTNDeathPact.blp"</span>,
    Ubertip = hcolor.yellow(<span class="hljs-string">"穿云箭"</span>),
    Hotkey = <span class="hljs-string">"E"</span>,
    _parent = <span class="hljs-string">"ANcl"</span>,
    _type = <span class="hljs-string">"skill"</span>,
    DataA = {<span class="hljs-number">0</span>},
    DataC = {<span class="hljs-number">1</span>},
    EffectArt = <span class="hljs-string">""</span>,
    TargetArt = <span class="hljs-string">""</span>,
    CasterArt = <span class="hljs-string">""</span>,
    Cool = { <span class="hljs-number">2</span> },
    DataB = { <span class="hljs-number">2</span> },
    Cost = { <span class="hljs-number">0</span> },
    DataD = { <span class="hljs-number">0</span> },
    Rng = { <span class="hljs-number">800</span> },
    DataF = {<span class="hljs-string">"berserk"</span>},
    _onSkillEffect = _onSkillEffect(<span class="hljs-function"><span class="hljs-keyword">function</span><span class="hljs-params">(evtData)</span></span>
        <span class="hljs-keyword">local</span> xy = <span class="hljs-built_in">math</span>.polarProjection(hunit.x(evtData.triggerUnit),hunit.y(evtData.triggerUnit),
                <span class="hljs-number">2000</span>,<span class="hljs-built_in">math</span>.getDegBetweenXY(hunit.x(evtData.triggerUnit),hunit.y(evtData.triggerUnit),evtData.targetX,evtData.targetY))
        hskill.leap({
            sourceUnit = evtData.triggerUnit, <span class="hljs-comment">--伤害来源（必须有！不管有没有伤害）</span>
            x = xy.x, <span class="hljs-comment">--冲击的x坐标（可选的，对点冲击，与某目标无关）</span>
            y = xy.y, <span class="hljs-comment">--冲击的y坐标（可选的，对点冲击，与某目标无关）</span>
            speed = <span class="hljs-number">50</span>, <span class="hljs-comment">--冲击的速度（可选的，默认10，0.02秒的移动距离,大概1秒500px)</span>
            acceleration = <span class="hljs-number">0.05</span>, <span class="hljs-comment">--冲击加速度（可选的，每个周期都会增加0.02秒一次)</span>
            filter = <span class="hljs-function"><span class="hljs-keyword">function</span><span class="hljs-params">(unit)</span></span>
                <span class="hljs-keyword">return</span> his.enemy(evtData.triggerUnit,unit) <span class="hljs-keyword">and</span> his.alive(unit)
            <span class="hljs-keyword">end</span>, <span class="hljs-comment">--必须有</span>
            tokenArrow = <span class="hljs-string">"war3mapImported\\aaaaaaaa.mdx"</span>, <span class="hljs-comment">--前冲的特效（arrowUnit=nil时认为必须！自身冲击就是bind，否则为马甲本身，如冲击波的波）</span>
            damageMovement = <span class="hljs-number">200</span>, <span class="hljs-comment">--移动过程中的伤害（可选的，默认为0）</span>
            damageMovementRadius = <span class="hljs-number">100</span>, <span class="hljs-comment">--移动过程中的伤害（可选的，默认为0，易知0范围是无效的所以有伤害也无法体现）</span>
            damageMovementRepeat = <span class="hljs-literal">false</span>, <span class="hljs-comment">--移动过程中伤害是否可以重复造成（可选的，默认为不能）</span>
            damageMovementDrag = <span class="hljs-literal">false</span>, <span class="hljs-comment">--移动过程是否拖拽敌人（可选的，默认为不能）</span>
            damageSrc = CONST_DAMAGE_SRC.skill, <span class="hljs-comment">--伤害的种类（可选）</span>
            damageType = {CONST_DAMAGE_TYPE.thunder} <span class="hljs-comment">--伤害的类型,注意是table（可选）</span>
        })
    <span class="hljs-keyword">end</span>)
})
</div></code></pre>
<h2 id="%E5%B0%8F%E5%B0%8F%E6%BC%94%E7%A4%BA">小小演示</h2>
<h3 id="hslk%E9%AB%98%E7%BA%A7%E7%94%A8%E6%B3%95%E6%BC%94%E7%A4%BA2">hslk高级用法演示2</h3>
<p>B站演示</p>
<blockquote>
<p><a target="_blank" href="https://www.bilibili.com/video/BV1M64y117sB">魔兽争霸hslk高级用法演示2</a></p>
</blockquote>
<p>多级技能配置</p>
<pre class="hljs"><code><div>hslk_ability({
    Name = <span class="hljs-string">"分裂"</span>,
    _parent = <span class="hljs-string">"Agyb"</span>, <span class="hljs-comment">-- 用了一个无效果被动技能做为父ID</span>
    Requires = <span class="hljs-string">""</span>,
    levels = <span class="hljs-number">3</span>, <span class="hljs-comment">-- 3级</span>
    _attr = {
        <span class="hljs-comment">--这里要分级设置attr属性</span>
        <span class="hljs-comment">--1级属性</span>
        _attr({
            <span class="hljs-comment">--做分裂效果这里用到了hlua库的xtras</span>
            xtras = {
                {
                    on = CONST_EVENT.attack,action = <span class="hljs-string">"targetUnit.spec.split"</span>,
                    odds = <span class="hljs-number">100</span>,val = <span class="hljs-string">"triggerUnit.attack"</span>,percent = <span class="hljs-number">100</span>,radius = <span class="hljs-number">500</span>
                }
            }
        }),
        <span class="hljs-comment">--2</span>
        _attr({
            xtras = {
                {
                    on = CONST_EVENT.attack,action = <span class="hljs-string">"targetUnit.spec.split"</span>,
                    odds = <span class="hljs-number">100</span>,val = <span class="hljs-string">"triggerUnit.attack"</span>,percent = <span class="hljs-number">200</span>,radius = <span class="hljs-number">500</span>
                }
            }
        }),
        <span class="hljs-comment">--3</span>
        _attr({
            xtras = {
                {
                    on = CONST_EVENT.attack,action = <span class="hljs-string">"targetUnit.spec.split"</span>,
                    odds = <span class="hljs-number">100</span>,val = <span class="hljs-string">"triggerUnit.attack"</span>,percent = <span class="hljs-number">300</span>,radius = <span class="hljs-number">500</span>
                }
            }
        })
    }
})
</div></code></pre>
<p>获取SLK数据及自定义值</p>
<pre class="hljs"><code><div>hslk_unit({
    _parent = <span class="hljs-string">"hpea"</span>,
    Name = <span class="hljs-string">"天选勇者"</span>,
    __skill = {
        <span class="hljs-string">"穿云箭"</span>,
        <span class="hljs-string">"分裂"</span>
    },
})

<span class="hljs-keyword">local</span> u = henemy.<span class="hljs-built_in">create</span>({
    teamNo = <span class="hljs-number">1</span>,
    id = hslk.n2i(<span class="hljs-string">"天选勇者"</span>),
    x = <span class="hljs-number">0</span>,
    y = <span class="hljs-number">0</span>
})
<span class="hljs-keyword">local</span> uSlk = hslk.i2v(hunit.getId(u),<span class="hljs-string">"__skill"</span>)
<span class="hljs-keyword">for</span> _, v <span class="hljs-keyword">in</span> <span class="hljs-built_in">ipairs</span>(uSlk) <span class="hljs-keyword">do</span>
    hskill.add(u,hslk.n2i(v),<span class="hljs-number">1</span>)
<span class="hljs-keyword">end</span>
</div></code></pre>
<h2 id="%E5%B0%8F%E5%B0%8F%E6%BC%94%E7%A4%BA">小小演示</h2>
<h3 id="hslk%E9%AB%98%E7%BA%A7%E7%94%A8%E6%B3%95%E6%BC%94%E7%A4%BA3">hslk高级用法演示3</h3>
<p>B站演示</p>
<blockquote>
<p><a target="_blank" href="https://www.bilibili.com/video/BV1ZV411J7JJ">魔兽争霸hslk高级用法演示3</a></p>
</blockquote>
<p>hslk的 _type 字段</p>
<pre class="hljs"><code><div><span class="hljs-comment">-- 循环创建10把武器，type设置成”aaa"</span>
<span class="hljs-keyword">for</span> i = <span class="hljs-number">1</span>, <span class="hljs-number">10</span> <span class="hljs-keyword">do</span>
    <span class="hljs-built_in">table</span>.<span class="hljs-built_in">insert</span>(it,{
        Name = <span class="hljs-string">"小刀【等级】"</span> .. i,
        _type = <span class="hljs-string">"aaa"</span>,
        _attr = _attr({
            attack_green = <span class="hljs-string">"+"</span> .. <span class="hljs-number">100</span> * i
        })
    })
<span class="hljs-keyword">end</span>

<span class="hljs-keyword">for</span> i = <span class="hljs-number">1</span>, <span class="hljs-number">10</span> <span class="hljs-keyword">do</span>
    <span class="hljs-keyword">local</span> un = henemy.<span class="hljs-built_in">create</span>({
        teamNo = <span class="hljs-number">1</span>,
        id = hslk.n2i(<span class="hljs-string">"天选勇者"</span>),
        x = <span class="hljs-number">0</span>,
        y = <span class="hljs-number">0</span>
    })
    <span class="hljs-comment">--给这几个单位注册个死亡事件</span>
    hevent.onDead(un, <span class="hljs-function"><span class="hljs-keyword">function</span><span class="hljs-params">(evtData)</span></span>
        <span class="hljs-comment">--获取</span>
        <span class="hljs-keyword">local</span> id = hslk.typeIds({ <span class="hljs-string">"aaa"</span> })
        hitem.<span class="hljs-built_in">create</span>({
            id = <span class="hljs-built_in">table</span>.<span class="hljs-built_in">random</span>(id),
            x = hunit.x(evtData.triggerUnit),
            y = hunit.y(evtData.triggerUnit)
        })
    <span class="hljs-keyword">end</span>)
<span class="hljs-keyword">end</span>
</div></code></pre>
<h2 id="%E5%B0%8F%E5%B0%8F%E6%BC%94%E7%A4%BA">小小演示</h2>
<h3 id="h-lua%E5%BA%93sync%E6%BC%94%E7%A4%BA">h-lua库sync演示</h3>
<p>B站演示</p>
<blockquote>
<p><a target="_blank" href="https://www.bilibili.com/video/BV1iv411L7CP">魔兽争霸h-lua库sync演示</a></p>
</blockquote>
<p>代码</p>
<pre class="hljs"><code><div><span class="hljs-keyword">local</span> shop = hunit.<span class="hljs-built_in">create</span>({
    whichPlayer = hplayer.players[<span class="hljs-number">1</span>],
    id = hslk.n2i(<span class="hljs-string">"商店"</span>),
    x = <span class="hljs-number">500</span>,
    y = <span class="hljs-number">500</span>
})
tb = {}
hshop.item.add(shop, hslk.n2i(<span class="hljs-string">"奖励"</span>), <span class="hljs-number">99</span>)
<span class="hljs-comment">--单位购买物品 触发UI</span>
<span class="hljs-comment">--注册出售物品事件</span>
hevent.onItemSell(shop, <span class="hljs-function"><span class="hljs-keyword">function</span><span class="hljs-params">(evtData)</span></span>
    hitem.del(evtData.soldItem)
    <span class="hljs-keyword">local</span> p = hunit.getOwner(evtData.buyingUnit)
    tb[p] = {}
    <span class="hljs-keyword">local</span> itTy = hslk.typeIds({ <span class="hljs-string">"skill"</span> })
    <span class="hljs-keyword">for</span> i = <span class="hljs-number">1</span>, <span class="hljs-number">3</span> <span class="hljs-keyword">do</span>
        <span class="hljs-built_in">table</span>.<span class="hljs-built_in">insert</span>(tb[p], <span class="hljs-built_in">table</span>.<span class="hljs-built_in">random</span>(itTy))
    <span class="hljs-keyword">end</span>
    <span class="hljs-keyword">if</span> (p == hplayer.loc()) <span class="hljs-keyword">then</span>
        <span class="hljs-comment">--设置UI图标 名称 和描述</span>
        <span class="hljs-keyword">for</span> i = <span class="hljs-number">1</span>, <span class="hljs-number">3</span> <span class="hljs-keyword">do</span>
            <span class="hljs-keyword">local</span> itSlk = hslk.i2v(tb[p][i], <span class="hljs-string">"slk"</span>)
            hjapi.DzFrameSetTexture(hjapi.DzFrameFindByName(<span class="hljs-string">"awar_jn_"</span> .. i, <span class="hljs-number">0</span>), itSlk.Art, <span class="hljs-number">0</span>)
            hjapi.DzFrameSetText(hjapi.DzFrameFindByName(<span class="hljs-string">"awar_jnname_"</span> .. i, <span class="hljs-number">0</span>), itSlk.Name)
            hjapi.DzFrameSetText(hjapi.DzFrameFindByName(<span class="hljs-string">"awar_jnsm_"</span> .. i, <span class="hljs-number">0</span>), itSlk.Ubertip)
        <span class="hljs-keyword">end</span>
        hjapi.DzFrameShow(awar, <span class="hljs-literal">true</span>)
    <span class="hljs-keyword">end</span>
<span class="hljs-keyword">end</span>)

UI = <span class="hljs-function"><span class="hljs-keyword">function</span><span class="hljs-params">()</span></span>
    <span class="hljs-comment">--加载toc</span>
    hdzui.loadToc(<span class="hljs-string">"UI\\frame.toc"</span>)
    <span class="hljs-comment">--初始化</span>
    awar = hdzui.frame(<span class="hljs-string">"awar"</span>,hdzui.origin.game(),<span class="hljs-number">0</span>)
    <span class="hljs-comment">--设置位置</span>
    hjapi.DzFrameSetAbsolutePoint(awar,<span class="hljs-number">4</span>,<span class="hljs-number">0.388</span>,<span class="hljs-number">0.350</span>)
    hjapi.DzFrameShow(awar,<span class="hljs-literal">false</span>)

    
    <span class="hljs-comment">--注册3个按钮点击事件</span>
    hsync.onFrameMouse(hjapi.DzFrameFindByName(<span class="hljs-string">"awar_1"</span>,<span class="hljs-number">0</span>),<span class="hljs-number">1</span>,<span class="hljs-function"><span class="hljs-keyword">function</span><span class="hljs-params">(syncData)</span></span>
        <span class="hljs-comment">--添加技能</span>
        hskill.add(hero[syncData.triggerPlayer],tb[syncData.triggerPlayer][<span class="hljs-number">1</span>],<span class="hljs-number">1</span>)
        <span class="hljs-keyword">if</span> (syncData.triggerPlayer ~= hplayer.loc()) <span class="hljs-keyword">then</span>
            <span class="hljs-keyword">return</span>
        <span class="hljs-keyword">end</span>
        hjapi.DzFrameShow(awar,<span class="hljs-literal">false</span>)
    <span class="hljs-keyword">end</span>)
    hsync.onFrameMouse(hjapi.DzFrameFindByName(<span class="hljs-string">"awar_2"</span>,<span class="hljs-number">0</span>),<span class="hljs-number">1</span>,<span class="hljs-function"><span class="hljs-keyword">function</span><span class="hljs-params">(syncData)</span></span>
        <span class="hljs-comment">--添加技能</span>
        hskill.add(hero[syncData.triggerPlayer],tb[syncData.triggerPlayer][<span class="hljs-number">2</span>],<span class="hljs-number">1</span>)
        <span class="hljs-keyword">if</span> (syncData.triggerPlayer ~= hplayer.loc()) <span class="hljs-keyword">then</span>
            <span class="hljs-keyword">return</span>
        <span class="hljs-keyword">end</span>
        hjapi.DzFrameShow(awar,<span class="hljs-literal">false</span>)
    <span class="hljs-keyword">end</span>)
    hsync.onFrameMouse(hjapi.DzFrameFindByName(<span class="hljs-string">"awar_3"</span>,<span class="hljs-number">0</span>),<span class="hljs-number">1</span>,<span class="hljs-function"><span class="hljs-keyword">function</span><span class="hljs-params">(syncData)</span></span>
        <span class="hljs-comment">--添加技能</span>
        hskill.add(hero[syncData.triggerPlayer],tb[syncData.triggerPlayer][<span class="hljs-number">3</span>],<span class="hljs-number">1</span>)
        <span class="hljs-keyword">if</span> (syncData.triggerPlayer ~= hplayer.loc()) <span class="hljs-keyword">then</span>
            <span class="hljs-keyword">return</span>
        <span class="hljs-keyword">end</span>
        hjapi.DzFrameShow(awar,<span class="hljs-literal">false</span>)
    <span class="hljs-keyword">end</span>)

<span class="hljs-keyword">end</span>
</div></code></pre>
<p>fdf文件</p>
<pre class="hljs"><code><div>Frame &quot;FRAME&quot; &quot;awar&quot;{
    Width 0.400,
    Height 0.258,
    LayerStyle &quot;IGNORETRACKEVENTS&quot;,
    Frame &quot;BACKDROP&quot; &quot;awarbakc&quot; {
    Width 0.400,
    Height 0.258,
    BackdropBackground  &quot;war3mapImported\awarTB.blp&quot;,
    BackdropBlendAll,
    SetPoint TOPLEFT, &quot;awar&quot;, TOPLEFT, 0, 0,
        Frame &quot;BUTTON&quot; &quot;awar_1&quot; {
            Height 0.213,
            Width 0.125,
            ControlStyle &quot;AUTOTRACK|HIGHLIGHTONMOUSEOVER&quot;,
            SetPoint LEFT, &quot;awar&quot;, LEFT , 0.010, 0,

            //背景
            ControlBackdrop &quot;awara&quot;,
            Frame &quot;BACKDROP&quot; &quot;awara&quot; {
                BackdropBackground  &quot;war3mapImported\awarAND.blp&quot;,
                BackdropBlendAll,
            }
            //按下
            ControlPushedBackdrop &quot;awaraa&quot;,
            Frame &quot;BACKDROP&quot; &quot;awaraa&quot; {
                BackdropBackground  &quot;war3mapImported\awarANX.blp&quot;,
                BackdropBlendAll,
            }
            //高亮
            ControlMouseOverHighlight &quot;awarga&quot;,
            Frame &quot;HIGHLIGHT&quot; &quot;awarga&quot; {
                HighlightType &quot;FILETEXTURE&quot;,
                HighlightAlphaFile &quot;UI\Widgets\BattleNet\bnet-button01-highlight-mouse.blp&quot;,
                HighlightAlphaMode &quot;ADD&quot;,
            }
            Frame &quot;BACKDROP&quot; &quot;awar_jn_1&quot; {

                Width 0.034,
                Height 0.042,
                BackdropBackground  &quot;ReplaceableTextures\PassiveButtons\PASBTNScatterRockets.blp&quot;,
                BackdropBlendAll,
                SetPoint TOPLEFT, &quot;awar_1&quot;, TOPLEFT, 0.040, -0.040,
                }
            Frame &quot;TEXT&quot; &quot;awar_jnname_1&quot; {
                Width 0.12,
                Height 0.1,
                DecorateFileNames,
                FrameFont &quot;MasterFont&quot;, 0.015, &quot;&quot;,
                FontJustificationH JUSTIFYCENTER,
                UseActiveContext,
                FontJustificationV JUSTIFYMIDDLE,
                LayerStyle &quot;IGNORETRACKEVENTS&quot;,
                SetPoint CENTER, &quot;awar_jn_1&quot;, CENTER, 0, -0.035,
                Text &quot;弹幕攻击&quot;,
            }
            Frame &quot;TEXT&quot; &quot;awar_jnsm_1&quot; {
                Width 0.080,
                Height 0.1,
                DecorateFileNames,
                FrameFont &quot;MasterFont&quot;, 0.01, &quot;&quot;,
                FontJustificationH JUSTIFYCENTER,
                UseActiveContext,
                FontJustificationV JUSTIFYMIDDLE,
                LayerStyle &quot;IGNORETRACKEVENTS&quot;,
                SetPoint CENTER, &quot;awar_jnname_1&quot;, CENTER, 0, -0.035,
                Text &quot;对周围的敌方空中单位进行强有力的弹幕攻击&quot;,
            }
        }
        Frame &quot;BUTTON&quot; &quot;awar_2&quot; {
            Height 0.213,
            Width 0.125,
            ControlStyle &quot;AUTOTRACK|HIGHLIGHTONMOUSEOVER&quot;,
            SetPoint LEFT, &quot;awar_1&quot;, RIGHT , 0, 0,

            //背景
            ControlBackdrop &quot;awarb&quot;,
            Frame &quot;BACKDROP&quot; &quot;awarb&quot; {
                BackdropBackground  &quot;war3mapImported\awarAND.blp&quot;,
                BackdropBlendAll,
            }
            //按下
            ControlPushedBackdrop &quot;awarab&quot;,
            Frame &quot;BACKDROP&quot; &quot;awarab&quot; {
                BackdropBackground  &quot;war3mapImported\awarANX.blp&quot;,
                BackdropBlendAll,
            }
            //高亮
            ControlMouseOverHighlight &quot;awargb&quot;,
            Frame &quot;HIGHLIGHT&quot; &quot;awargb&quot; {
                HighlightType &quot;FILETEXTURE&quot;,
                HighlightAlphaFile &quot;UI\Widgets\BattleNet\bnet-button01-highlight-mouse.blp&quot;,
                HighlightAlphaMode &quot;ADD&quot;,
            }
            Frame &quot;BACKDROP&quot; &quot;awar_jn_2&quot; {

                Width 0.034,
                Height 0.042,
                BackdropBackground  &quot;ReplaceableTextures\PassiveButtons\PASBTNScatterRockets.blp&quot;,
                BackdropBlendAll,
                SetPoint TOPLEFT, &quot;awar_2&quot;, TOPLEFT, 0.040, -0.040,
                }
            Frame &quot;TEXT&quot; &quot;awar_jnname_2&quot; {
                Width 0.12,
                Height 0.1,
                DecorateFileNames,
                FrameFont &quot;MasterFont&quot;, 0.015, &quot;&quot;,
                FontJustificationH JUSTIFYCENTER,
                UseActiveContext,
                FontJustificationV JUSTIFYMIDDLE,
                LayerStyle &quot;IGNORETRACKEVENTS&quot;,
                SetPoint CENTER, &quot;awar_jn_2&quot;, CENTER, 0, -0.035,
                Text &quot;弹幕攻击&quot;,
            }
            Frame &quot;TEXT&quot; &quot;awar_jnsm_2&quot; {
                Width 0.080,
                Height 0.1,
                DecorateFileNames,
                FrameFont &quot;MasterFont&quot;, 0.01, &quot;&quot;,
                FontJustificationH JUSTIFYCENTER,
                UseActiveContext,
                FontJustificationV JUSTIFYMIDDLE,
                LayerStyle &quot;IGNORETRACKEVENTS&quot;,
                SetPoint CENTER, &quot;awar_jnname_2&quot;, CENTER, 0, -0.035,
                Text &quot;对周围的敌方空中单位进行强有力的弹幕攻击&quot;,
            }
        }
        Frame &quot;BUTTON&quot; &quot;awar_3&quot; {
            Height 0.213,
            Width 0.125,
            ControlStyle &quot;AUTOTRACK|HIGHLIGHTONMOUSEOVER&quot;,
            SetPoint LEFT, &quot;awar_2&quot;, RIGHT , 0, 0,

            //背景
            ControlBackdrop &quot;awarc&quot;,
            Frame &quot;BACKDROP&quot; &quot;awarc&quot; {
                BackdropBackground  &quot;war3mapImported\awarAND.blp&quot;,
                BackdropBlendAll,
            }
            //按下
            ControlPushedBackdrop &quot;awarac&quot;,
            Frame &quot;BACKDROP&quot; &quot;awarac&quot; {
                BackdropBackground  &quot;war3mapImported\awarANX.blp&quot;,
                BackdropBlendAll,
            }
            //高亮
            ControlMouseOverHighlight &quot;awargc&quot;,
            Frame &quot;HIGHLIGHT&quot; &quot;awargc&quot; {
                HighlightType &quot;FILETEXTURE&quot;,
                HighlightAlphaFile &quot;UI\Widgets\BattleNet\bnet-button01-highlight-mouse.blp&quot;,
                HighlightAlphaMode &quot;ADD&quot;,
            }
            Frame &quot;BACKDROP&quot; &quot;awar_jn_3&quot; {

                Width 0.034,
                Height 0.042,
                BackdropBackground  &quot;ReplaceableTextures\PassiveButtons\PASBTNScatterRockets.blp&quot;,
                BackdropBlendAll,
                SetPoint TOPLEFT, &quot;awar_3&quot;, TOPLEFT, 0.040, -0.040,
                }
            Frame &quot;TEXT&quot; &quot;awar_jnname_3&quot; {
                Width 0.12,
                Height 0.1,
                DecorateFileNames,
                FrameFont &quot;MasterFont&quot;, 0.015, &quot;&quot;,
                FontJustificationH JUSTIFYCENTER,
                UseActiveContext,
                FontJustificationV JUSTIFYMIDDLE,
                LayerStyle &quot;IGNORETRACKEVENTS&quot;,
                SetPoint CENTER, &quot;awar_jn_3&quot;, CENTER, 0, -0.035,
                Text &quot;弹幕攻击&quot;,
            }
            Frame &quot;TEXT&quot; &quot;awar_jnsm_3&quot; {
                Width 0.080,
                Height 0.1,
                DecorateFileNames,
                FrameFont &quot;MasterFont&quot;, 0.01, &quot;&quot;,
                FontJustificationH JUSTIFYCENTER,
                UseActiveContext,
                FontJustificationV JUSTIFYMIDDLE,
                LayerStyle &quot;IGNORETRACKEVENTS&quot;,
                SetPoint CENTER, &quot;awar_jnname_3&quot;, CENTER, 0, -0.035,
                Text &quot;对周围的敌方空中单位进行强有力的弹幕攻击&quot;,
            }
        }
    }
}
</div></code></pre>
<h2 id="%E5%B0%8F%E5%B0%8F%E6%BC%94%E7%A4%BA">小小演示</h2>
<h3 id="%E6%9E%84%E5%BB%BA%E9%85%92%E9%A6%86%E4%B8%8E%E5%B0%8F%E5%9C%B0%E5%9B%BEui%E6%98%BE%E7%A4%BA%E5%A4%B4%E5%83%8F">构建酒馆与小地图UI显示头像</h3>
<p>B站演示</p>
<blockquote>
<p><a target="_blank" href="https://www.bilibili.com/video/BV1Hy4y1s7cj">魔兽争霸构建酒馆与小地图UI显示头像</a></p>
</blockquote>
<p>小地图UI显示头像</p>
<blockquote>
<p>h-lua已添加此完整功能接口，建议直接使用，不必像下方自己实现</p>
</blockquote>
<pre class="hljs"><code><div><span class="hljs-comment">--[[
    绑定一个单位在"小地图"上显示你想要的贴图
    options = {
        frequency = 0.05, --刷新频率
        whichUnit = nil, --某单位
        texture = {file="",w=0.1,h=0.12,opacity}, --是用的单位标志：贴图文件、宽、高、透明[0.0-1.0]
        miniMap = {frame=0,w=0,h=0}, -- 小地图大小位置参数：UI—id、宽、高
        action = function(trackOptions){}, -- 每周期行为
    }
]]</span>
<span class="hljs-comment">---@param options pilotDZUIMiniMapTrack</span>
hdzui.miniMapTrack = <span class="hljs-function"><span class="hljs-keyword">function</span><span class="hljs-params">(options)</span></span>
    <span class="hljs-keyword">if</span> (options.whichUnit == <span class="hljs-literal">nil</span> <span class="hljs-keyword">or</span> his.deleted(options.whichUnit)) <span class="hljs-keyword">then</span>
        <span class="hljs-keyword">return</span>
    <span class="hljs-keyword">end</span>
    options.frequency = options.frequency <span class="hljs-keyword">or</span> <span class="hljs-number">0.05</span>
    options.texture = options.texture <span class="hljs-keyword">or</span> {}
    options.texture.file = options.texture.file <span class="hljs-keyword">or</span> hunit.getAvatar(hunit.getId(options.whichUnit))
    options.texture.w = options.texture.w <span class="hljs-keyword">or</span> <span class="hljs-number">0.016</span>
    options.texture.h = options.texture.h <span class="hljs-keyword">or</span> <span class="hljs-number">0.016</span>
    options.texture.opacity = options.texture.opacity <span class="hljs-keyword">or</span> <span class="hljs-number">1.0</span>
    options.miniMap = options.miniMap <span class="hljs-keyword">or</span> {}
    options.miniMap.frame = options.miniMap.frame <span class="hljs-keyword">or</span> hdzui.origin.miniMap()
    options.miniMap.w = options.miniMap.w <span class="hljs-keyword">or</span> <span class="hljs-number">0.13875</span>
    options.miniMap.h = options.miniMap.h <span class="hljs-keyword">or</span> <span class="hljs-number">0.1375</span>
    <span class="hljs-keyword">if</span> (<span class="hljs-built_in">type</span>(options.action) ~= <span class="hljs-string">"function"</span>) <span class="hljs-keyword">then</span>
        options.action = <span class="hljs-function"><span class="hljs-keyword">function</span><span class="hljs-params">(_t)</span></span>
            <span class="hljs-comment">-- 设_t.deleted=true则中止追踪</span>
            <span class="hljs-keyword">if</span> (his.dead(_t.whichUnit)) <span class="hljs-keyword">then</span>
                hjapi.DzFrameShow(_t.frame, <span class="hljs-literal">false</span>)
                <span class="hljs-keyword">return</span>
            <span class="hljs-keyword">end</span>
            hplayer.forEach(<span class="hljs-function"><span class="hljs-keyword">function</span><span class="hljs-params">(enumPlayer, _)</span></span>
                <span class="hljs-keyword">if</span> (enumPlayer == hplayer.loc()) <span class="hljs-keyword">then</span>
                    hjapi.DzFrameShow(_t.frame, his.allyPlayer(_t.whichUnit, enumPlayer))
                <span class="hljs-keyword">end</span>
            <span class="hljs-keyword">end</span>)
        <span class="hljs-keyword">end</span>
    <span class="hljs-keyword">end</span>
    <span class="hljs-keyword">local</span> track = hdzui.frameTag(<span class="hljs-string">"BACKDROP"</span>, <span class="hljs-string">"StandardMenuTinyButtonBaseBackdrop"</span>, hdzui.origin.game())
    <span class="hljs-keyword">if</span> (track &lt;= <span class="hljs-number">0</span>) <span class="hljs-keyword">then</span>
        <span class="hljs-keyword">return</span>
    <span class="hljs-keyword">end</span>
    hjapi.DzFrameSetTexture(track, options.texture.file)
    hjapi.DzFrameSetAlpha(track, <span class="hljs-number">255</span> * options.texture.opacity)
    hjapi.DzFrameSetSize(track, options.texture.w, options.texture.h)
    hjapi.DzFrameShow(track, <span class="hljs-literal">false</span>)
    options.frame = track
    options.deleted = <span class="hljs-literal">false</span>
    htime.setInterval(options.frequency, <span class="hljs-function"><span class="hljs-keyword">function</span><span class="hljs-params">(curTimer)</span></span>
        <span class="hljs-keyword">if</span> (options.deleted == <span class="hljs-literal">true</span> <span class="hljs-keyword">or</span> his.deleted(options.whichUnit)) <span class="hljs-keyword">then</span>
            htime.delTimer(curTimer)
            hjapi.DzFrameShow(options.frame, <span class="hljs-literal">false</span>)
            hjapi.DzFrameSetEnable(options.frame, <span class="hljs-literal">false</span>)
            <span class="hljs-keyword">return</span>
        <span class="hljs-keyword">end</span>
        <span class="hljs-keyword">local</span> x = (hunit.x(options.whichUnit) - hrect.getMinX(hrect.world())) / hrect.getWidth(hrect.world()) * options.miniMap.w
        <span class="hljs-keyword">local</span> y = (hunit.y(options.whichUnit) - hrect.getMinY(hrect.world())) / hrect.getHeight(hrect.world()) * options.miniMap.h
        hdzui.framePoint(options.frame, options.miniMap.frame, FRAME_ALIGN_CENTER, FRAME_ALIGN_LEFT_BOTTOM, x, y)
        options.action(options)
    <span class="hljs-keyword">end</span>)
<span class="hljs-keyword">end</span>
</div></code></pre>
<h2 id="%E5%B0%8F%E5%B0%8F%E6%BC%94%E7%A4%BA">小小演示</h2>
<h3 id="%E4%BC%A4%E5%AE%B3%E6%8E%92%E8%A1%8C%E6%A6%9C">伤害排行榜</h3>
<p>B站演示</p>
<blockquote>
<p><a target="_blank" href="https://www.bilibili.com/video/BV1Lh411v7pR">魔兽争霸伤害排行榜</a></p>
</blockquote>
<p>伤害排行榜UI显示</p>
<pre class="hljs"><code><div>UI = <span class="hljs-function"><span class="hljs-keyword">function</span><span class="hljs-params">()</span></span>
    <span class="hljs-comment">--加载toc</span>
    hdzui.loadToc(<span class="hljs-string">"UI\\frame.toc"</span>)
    <span class="hljs-comment">--初始化</span>
    awar = hdzui.frame(<span class="hljs-string">"awar"</span>,hdzui.origin.game(),<span class="hljs-number">0</span>)
    <span class="hljs-comment">--设置位置</span>
    hjapi.DzFrameSetAbsolutePoint(awar,<span class="hljs-number">4</span>,<span class="hljs-number">0.388</span>,<span class="hljs-number">0.350</span>)
    hjapi.DzFrameShow(awar,<span class="hljs-literal">false</span>)

    <span class="hljs-comment">--伤害榜初始化</span>
    damUI = {}
    txtUI = {}
    barUI = {}
    <span class="hljs-comment">--logo</span>
    damUI[<span class="hljs-number">1</span>] = hdzui.frameTag(<span class="hljs-string">"BACKDROP"</span>,<span class="hljs-string">"x1"</span>,hdzui.origin.game(),<span class="hljs-string">""</span>)
    hjapi.DzFrameSetTexture(damUI[<span class="hljs-number">1</span>],<span class="hljs-string">"war3mapImported\\dam.tga"</span>,<span class="hljs-literal">false</span>)
    hjapi.DzFrameSetAbsolutePoint(damUI[<span class="hljs-number">1</span>],<span class="hljs-number">4</span>,<span class="hljs-number">0.744</span>,<span class="hljs-number">0.411</span>)
    hjapi.DzFrameSetSize(damUI[<span class="hljs-number">1</span>],<span class="hljs-number">0.108</span>,<span class="hljs-number">0.026</span>)
    hjapi.DzFrameShow(damUI[<span class="hljs-number">1</span>],<span class="hljs-literal">true</span>)
    <span class="hljs-comment">--忘记放我可爱的音乐了</span>
    hplayer.forEach(<span class="hljs-function"><span class="hljs-keyword">function</span><span class="hljs-params">(enumPlayer, idx)</span></span>
        <span class="hljs-comment">--头像</span>
        damUI[idx + <span class="hljs-number">1</span>] = hdzui.frameTag(<span class="hljs-string">"BACKDROP"</span>,<span class="hljs-string">"tx1"</span> .. idx,hdzui.origin.game(),<span class="hljs-string">""</span>)
        hjapi.DzFrameSetTexture(damUI[idx + <span class="hljs-number">1</span>],<span class="hljs-string">"war3mapImported\\tx.tga"</span>,<span class="hljs-literal">false</span>)
        hjapi.DzFrameSetPoint(damUI[idx + <span class="hljs-number">1</span>],<span class="hljs-number">2</span>,damUI[<span class="hljs-number">1</span>],<span class="hljs-number">8</span>,<span class="hljs-number">0</span>,<span class="hljs-number">0</span>)
        hjapi.DzFrameSetSize(damUI[idx + <span class="hljs-number">1</span>],<span class="hljs-number">0.015</span>,<span class="hljs-number">0.019</span>)
        hjapi.DzFrameShow(damUI[idx + <span class="hljs-number">1</span>],<span class="hljs-literal">false</span>)

        <span class="hljs-comment">--条条</span>
        barUI[idx] = hdzui.frameTag(<span class="hljs-string">"BACKDROP"</span>,<span class="hljs-string">"txx"</span> .. idx,damUI[idx + <span class="hljs-number">1</span>],<span class="hljs-string">""</span>)
        hjapi.DzFrameSetTexture(barUI[idx],<span class="hljs-string">"war3mapImported\\green.tga"</span>,<span class="hljs-literal">false</span>)
        hjapi.DzFrameSetPoint(barUI[idx],<span class="hljs-number">5</span>,damUI[idx + <span class="hljs-number">1</span>],<span class="hljs-number">3</span>,<span class="hljs-number">0</span>,<span class="hljs-number">0</span>)
        hjapi.DzFrameSetSize(barUI[idx],<span class="hljs-number">0.107</span>,<span class="hljs-number">0.019</span>)
        hjapi.DzFrameShow(barUI[idx],<span class="hljs-literal">true</span>)

        <span class="hljs-comment">--伤害文字</span>
        txtUI[idx] = hdzui.frameTag(<span class="hljs-string">"TEXT"</span>,<span class="hljs-string">"tx"</span> .. idx,damUI[idx + <span class="hljs-number">1</span>],<span class="hljs-string">""</span>)
        hjapi.DzFrameSetText(txtUI[idx],<span class="hljs-string">"0"</span>)
        hjapi.DzFrameSetPoint(txtUI[idx],<span class="hljs-number">5</span>,barUI[idx],<span class="hljs-number">3</span>,<span class="hljs-number">0</span>,<span class="hljs-number">0</span>)
        hjapi.DzFrameSetSize(txtUI[idx],<span class="hljs-number">0.030</span>,<span class="hljs-number">0.017</span>)
        hjapi.DzFrameShow(txtUI[idx],<span class="hljs-literal">true</span>)
    <span class="hljs-keyword">end</span>)
    <span class="hljs-comment">--注册3个按钮点击事件</span>
    hsync.onFrameMouse(hjapi.DzFrameFindByName(<span class="hljs-string">"awar_1"</span>,<span class="hljs-number">0</span>),<span class="hljs-number">1</span>,<span class="hljs-function"><span class="hljs-keyword">function</span><span class="hljs-params">(syncData)</span></span>
        <span class="hljs-comment">--添加技能</span>
        hskill.add(hero[syncData.triggerPlayer],tb[syncData.triggerPlayer][<span class="hljs-number">1</span>],<span class="hljs-number">1</span>)
        <span class="hljs-keyword">if</span> (syncData.triggerPlayer ~= hplayer.loc()) <span class="hljs-keyword">then</span>
            <span class="hljs-keyword">return</span>
        <span class="hljs-keyword">end</span>
        hjapi.DzFrameShow(awar,<span class="hljs-literal">false</span>)
    <span class="hljs-keyword">end</span>)
    hsync.onFrameMouse(hjapi.DzFrameFindByName(<span class="hljs-string">"awar_2"</span>,<span class="hljs-number">0</span>),<span class="hljs-number">1</span>,<span class="hljs-function"><span class="hljs-keyword">function</span><span class="hljs-params">(syncData)</span></span>
        <span class="hljs-comment">--添加技能</span>
        hskill.add(hero[syncData.triggerPlayer],tb[syncData.triggerPlayer][<span class="hljs-number">2</span>],<span class="hljs-number">1</span>)
        <span class="hljs-keyword">if</span> (syncData.triggerPlayer ~= hplayer.loc()) <span class="hljs-keyword">then</span>
            <span class="hljs-keyword">return</span>
        <span class="hljs-keyword">end</span>
        hjapi.DzFrameShow(awar,<span class="hljs-literal">false</span>)
    <span class="hljs-keyword">end</span>)
    hsync.onFrameMouse(hjapi.DzFrameFindByName(<span class="hljs-string">"awar_3"</span>,<span class="hljs-number">0</span>),<span class="hljs-number">1</span>,<span class="hljs-function"><span class="hljs-keyword">function</span><span class="hljs-params">(syncData)</span></span>
        <span class="hljs-comment">--添加技能</span>
        hskill.add(hero[syncData.triggerPlayer],tb[syncData.triggerPlayer][<span class="hljs-number">3</span>],<span class="hljs-number">1</span>)
        <span class="hljs-keyword">if</span> (syncData.triggerPlayer ~= hplayer.loc()) <span class="hljs-keyword">then</span>
            <span class="hljs-keyword">return</span>
        <span class="hljs-keyword">end</span>
        hjapi.DzFrameShow(awar,<span class="hljs-literal">false</span>)
    <span class="hljs-keyword">end</span>)

    <span class="hljs-comment">--然后计时器改变UI位置</span>

    htime.setInterval(<span class="hljs-number">0.05</span>,<span class="hljs-function"><span class="hljs-keyword">function</span><span class="hljs-params">(curTimer)</span></span>
        <span class="hljs-keyword">local</span> <span class="hljs-built_in">sort</span> = {}
        hplayer.forEach(<span class="hljs-function"><span class="hljs-keyword">function</span><span class="hljs-params">(enumPlayer, idx)</span></span>
            <span class="hljs-keyword">local</span> s = {idx = idx , val = hplayer.getDamage(enumPlayer)}
            <span class="hljs-built_in">table</span>.<span class="hljs-built_in">insert</span>(<span class="hljs-built_in">sort</span>,s)
        <span class="hljs-keyword">end</span>)
        <span class="hljs-comment">--排序</span>
        <span class="hljs-built_in">table</span>.<span class="hljs-built_in">sort</span>(<span class="hljs-built_in">sort</span>,<span class="hljs-function"><span class="hljs-keyword">function</span><span class="hljs-params">(a, b)</span></span>
            <span class="hljs-keyword">if</span> (a.val == b.val) <span class="hljs-keyword">then</span>
                <span class="hljs-keyword">return</span> b.idx &gt; a.idx
            <span class="hljs-keyword">end</span>
            <span class="hljs-keyword">return</span> a.val &gt; b.val
        <span class="hljs-keyword">end</span>)
        <span class="hljs-comment">--根据排序更改头像UI位置</span>
        <span class="hljs-keyword">local</span> dam = <span class="hljs-built_in">sort</span>[<span class="hljs-number">1</span>].val
        <span class="hljs-keyword">local</span> i = <span class="hljs-number">0</span>
        <span class="hljs-keyword">for</span> k,v <span class="hljs-keyword">in</span> <span class="hljs-built_in">ipairs</span>(<span class="hljs-built_in">sort</span>)<span class="hljs-keyword">do</span>
            <span class="hljs-keyword">if</span> (k &gt; <span class="hljs-number">1</span>) <span class="hljs-keyword">then</span>
                <span class="hljs-comment">--除了排第一的 其他条条根据第一名伤害来确定大小</span>
                i = v.val / dam
                hjapi.DzFrameSetSize(barUI[v.idx],i * <span class="hljs-number">0.107</span>,<span class="hljs-number">0.019</span>)
            <span class="hljs-keyword">else</span>
                hjapi.DzFrameSetSize(barUI[v.idx],<span class="hljs-number">0.107</span>,<span class="hljs-number">0.019</span>)
            <span class="hljs-keyword">end</span>
            <span class="hljs-comment">--修改伤害文字</span>
            hjapi.DzFrameSetText(txtUI[v.idx],<span class="hljs-built_in">math</span>.round(hplayer.getDamage(hplayer.players[v.idx])))
            <span class="hljs-comment">--修改头像图标</span>
            hjapi.DzFrameSetTexture(damUI[v.idx + <span class="hljs-number">1</span>],hslk.i2v(hunit.getId(hero[v.idx]),<span class="hljs-string">"slk"</span>,<span class="hljs-string">"Art"</span>),<span class="hljs-literal">false</span>)
            <span class="hljs-comment">--修改头像UI位置</span>
            hjapi.DzFrameSetPoint(damUI[v.idx + <span class="hljs-number">1</span>],<span class="hljs-number">2</span>,damUI[<span class="hljs-number">1</span>],<span class="hljs-number">8</span>,<span class="hljs-number">0</span>,(k - <span class="hljs-number">1</span>) * <span class="hljs-number">-0.02</span>)
            hjapi.DzFrameShow(damUI[v.idx + <span class="hljs-number">1</span>],<span class="hljs-literal">true</span>)
        <span class="hljs-keyword">end</span>
    <span class="hljs-keyword">end</span>)
<span class="hljs-keyword">end</span>
</div></code></pre>
<h2 id="%E9%AB%98%E7%AB%AF%E6%BC%94%E7%A4%BA">高端演示</h2>
<p>B站演示</p>
<blockquote>
<p><a target="_blank" href="https://www.bilibili.com/video/BV1p44y1k7aG">魔兽争霸lua作图 - 完美动态箭矢模拟实际效果演示</a></p>
</blockquote>
<blockquote>
<p><a target="_blank" href="https://www.bilibili.com/video/BV1AA411w7iZ">魔兽争霸lua作图 - 七十二变模型箭矢效果演示</a></p>
</blockquote>
<blockquote>
<p><a target="_blank" href="https://www.bilibili.com/video/BV1pU4y177C6">魔兽争霸lua作图 - hot实时热更新，调试从未如此轻松</a></p>
</blockquote>
<blockquote>
<p><a target="_blank" href="https://www.bilibili.com/video/BV1p3411q78m">魔兽争霸lua作图 - 技能实时动态选区</a></p>
</blockquote>
<blockquote>
<p><a target="_blank" href="https://www.bilibili.com/video/BV18L411x7Wj">魔兽争霸lua作图 - 非凡技能栏</a></p>
</blockquote>

</body>
</html>
